select VatNO,standard from DyeProcessList order by case left(VatNO,2) when 'JB' then 1 else 0 end
select VatNO,standard from DyeProcessList order by case left(VatNO,2) when 'JB' then 1 else 0 end,standard desc若VatNO中间含有‘JB’的话charindex('JB',VatNO)>0就不行了
select VatNO,standard from DyeProcessListorder by VatNO desc , standard desc
没仔细考虑 pbsql(风云) 的更好一些
在delphi里面怎么回报这样的错?? SQLText := ' select * from DyeProcessList a,DyeVat b where a.VatNo=b.VatNo order by case left(VatNO,2) when 'JB' then 1 else 0 end,standard descc ' [Error] DyeDayPrn.pas(73): Missing operator or semicolon [Error] DyeDayPrn.pas(73): Statement expected, but expression of type 'String' found [Fatal Error] Salary.dpr(214): Could not compile used unit 'Report\DyeDayPrn.pas'
SQLText := ' select * from DyeProcessList a,DyeVat b where a.VatNo=b.VatNo order by case left(VatNO,2) when '''+JB+''' then 1 else 0 end,standard descc '-------中间不要回车,回车的话就用+连接
SQLText := ' select * from DyeProcessList a,DyeVat b where a.VatNo=b.VatNo order by case left(VatNO,2) when ''JB'' then 1 else 0 end,standard descc 'delphi中引号中的引号的使用规则与SQL SERVER一样的
order by case left(VatNO,2) when 'JB' then 1 else 0 end
order by case left(VatNO,2) when 'JB' then 1 else 0 end,standard desc若VatNO中间含有‘JB’的话charindex('JB',VatNO)>0就不行了
order by case left(VatNO,2) when 'JB' then 1 else 0 end,standard descc '
[Error] DyeDayPrn.pas(73): Missing operator or semicolon
[Error] DyeDayPrn.pas(73): Statement expected, but expression of type 'String' found
[Fatal Error] Salary.dpr(214): Could not compile used unit 'Report\DyeDayPrn.pas'