SELECT AgentId, StartTime,
EventTo = dateadd(hh,datepart(hh,StartTime)+1,convert(datetime,convert(varchar,StartTime,112 ))),
EndTime
from [stage].[Agent]
where EndTime is not null and StartTime is not null
上記の行は、DbFit というツール内で実行するとエラーになりますが、SSMS では正常に実行されます。
An expression of non-boolean type specified in a context where a condition is expected, near 'EndTime'.
SSMS でエラーを再現する唯一の方法は次のとおりです。
SELECT AgentId, StartTime,
EventTo = dateadd(hh,datepart(hh,StartTime)+1,convert(datetime,convert(varchar,StartTime,112 ))),
EndTime
from [stage].[Agent]
where EndTime
何が問題で、どのように解決するかについてのアイデア...