sql语句 = 附近有错误
Selectdistincta.Stcd,b.Stnm,a.ID,a.ParaKind,c.Remark,a.ParaValue,a.CollectTime,iif(a....
Select distinct a.Stcd,b.Stnm, a.ID,a.ParaKind,c.Remark,a.ParaValue,a.CollectTime, iif(a.Imported=0,''否'',''是'') as Imported from (T_Data as a '
+ 'left join T_StationMarker as b on a.Stcd=b.Stcd) inner join T_ParaKind as c on ( a.CollectTime between #%s# and #%s# and c.ParaKind=a.ParaKind ) order by a.CollectTime asc 提示‘=’附近有错误,好像是第一行的等号 ,求解 展开
+ 'left join T_StationMarker as b on a.Stcd=b.Stcd) inner join T_ParaKind as c on ( a.CollectTime between #%s# and #%s# and c.ParaKind=a.ParaKind ) order by a.CollectTime asc 提示‘=’附近有错误,好像是第一行的等号 ,求解 展开
3个回答
展开全部
Select distinct a.Stcd,b.Stnm, a.ID,a.ParaKind,c.Remark,a.ParaValue,a.CollectTime, case a.Imported when '0' then '否' else '是' end as Imported from
(T_Data as a left join T_StationMarker as b on a.Stcd=b.Stcd) inner join T_ParaKind as c on ( a.CollectTime between #%s# and #%s# and c.ParaKind=a.ParaKind )
order by a.CollectTime asc
(T_Data as a left join T_StationMarker as b on a.Stcd=b.Stcd) inner join T_ParaKind as c on ( a.CollectTime between #%s# and #%s# and c.ParaKind=a.ParaKind )
order by a.CollectTime asc
更多追问追答
追问
你的语句我在delphi中运行,执行结果是提示0附近有语法错误。数据表中imported的类型是int型的。
追答
Select distinct a.Stcd,b.Stnm, a.ID,a.ParaKind,c.Remark,a.ParaValue,a.CollectTime, case a.Imported when 0 then '否' else '是' end as Imported from
(T_Data as a left join T_StationMarker as b on a.Stcd=b.Stcd) inner join T_ParaKind as c on ( a.CollectTime between #%s# and #%s# and c.ParaKind=a.ParaKind )
order by a.CollectTime asc
你再试试看!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询