-1
 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

何が問題で、どのように解決するかについてのアイデア...

4

1 に答える 1

0

これは答え以上の回避策です。これは DbFit の既存の問題です。詳細については、 https://github.com/dbfit/dbfit/issues/284を参照してください。

于 2015-11-09T16:53:45.760 に答える