关键字'where'附近的语法不正确

时间:2017-08-01 14:33:47

标签: syntax

对于我收到此错误的原因略有疑惑;

select * 
from #test1
where basepolicystartdate < '20160701' 
  and basepolicyenddate is not null
  and renewaldate is not null
where basepolicyid = 5294

我收到了这个错误:

  

第15行,第15行,第1行,第24行   关键字'where'

附近的语法不正确

如果有人能指出我正确的方向。

使用SQL Server Management Studio 2017

1 个答案:

答案 0 :(得分:0)

WHERE basepolicyid = 5294

您的查询中已经有WHERE子句,是否意味着要添加另一个&#39; AND&#39;?

编辑:添加格式以便于阅读。

相关问题