大家给看看这个sql怎么错了,提示"第 2 行: '=' 附近有语法错误。"
if (select datediff(day,xsd_date=(selece top 1 xsd_date from kroa_wl_xsd order by xsd_id ),getdate())>2)
begin
update y set y.countwjbj=1
from srv_lnk.zhij.dbo.li as y
where y.countwjname='test'
end
[解决办法]
if (datediff(day,(select top 1 xsd_date from kroa_wl_xsd order by xsd_id ),getdate()))>2
begin
update y set y.countwjbj=1
from srv_lnk.zhij.dbo.li as y
where y.countwjname= 'test '
end
[解决办法]
if datediff(day,(select top 1 xsd_date from kroa_wl_xsd order by xsd_id),getdate()) >2
[解决办法]
declare @xsd_date datetime
select top 1 @xsd_date=xsd_date from kroa_wl_xsd order by xsd_id
if datediff(day,@xsd_date,getdate()) >2
begin
update y set y.countwjbj=1
from srv_lnk.zhij.dbo.li as y
where y.countwjname= 'test '
end
[解决办法]
if (select datediff(day,xsd_date=(selece top 1 xsd_date from kroa_wl_xsd order by xsd_id ),getdate())) >2)