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
运行后得到
结果想知道为什么 SIN(RADIANS(140)) 得到的结果是0.9093。这里140指的不是数字140?是位置指针或者其它标记,算的是某个单元格的值?
问题已解决,一个大神朋友瞬间指出关键点,浮点数
SIN(RADIANS(140))中的140要使用140.0。
SQL中参数什么类型 返回的就是什么类型
网友评论