首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

Invalid use of keyword Token:when请教是咋回事

2012-02-09 
Invalid use of keywordToken:when请问是怎么回事?我执行的语句是这样的Query4.SQL.Add(select(case when

Invalid use of keyword Token:when请问是怎么回事?
我执行的语句是这样的
  Query4.SQL.Add('select (case when a.Responsible<>'''' then a.Responsible else b.Responsible end) as 姓名,a.totaljob,a.fault+b.fault from "e:\btotal.dbf" a, "e:\ctotal.dbf" b') ;
  Query4.Open;

如果把(case when a.Responsible<>'''' then a.Responsible else b.Responsible end) as 姓名,这段去掉就没问题了,可我应该没写错啊

[解决办法]
sql.Add('select ITEMCODE,OPS_DATE,OPS_QNTY, (case when ISIN=0 then ''未排'' else ''已排'' end) as isin from CUSTOMERDATE where ISIN=0 ');

我的代码怎么没有错呀

热点排行