DECLARE @startDate datetime, @endDate datetime
SET @startDate = '2012-01-10 18:00:00'
SET @endDate = '2012-01-10 19:00:00'
SELECT [timestamp],
WndDir3,
SIN(RADIANS(WndDir3)) as Sin_WD,
COS(RADIANS(WndDir3)) as Cos_WD,
SIN(RADIANS(140)) as Sin_140,
COS(RADIANS(140)) as Cos_140,
RH3
FROM [eolos].[met].[MetA_1Sec]
WHERE [timestamp]>@startDate AND [timestamp]<@endDate
運(yùn)行后得到
想知道為什么 SIN(RADIANS(140)) 得到的結(jié)果是0.9093。這里140指的不是數(shù)字140?是位置指針或者其它標(biāo)記,算的是某個(gè)單元格的值肘交?
問(wèn)題已解決,一個(gè)大神朋友瞬間指出關(guān)鍵點(diǎn)扑馁,浮點(diǎn)數(shù)
SIN(RADIANS(140))中的140要使用140.0。
SQL中參數(shù)什么類型 返回的就是什么類型