谁用过这样的语句,答对者高分!(再现等待)
with adozbcx do
begin
close;
sql.Clear;
sql.Add('update zzlr set zzdf=case when zzwc>='''+floattostr(ha)+''' then zzdf=5*100*zzqz when zzwc<'''+floattostr(ha)+''' and zzwc>='''+floattostr(jh)+''' then zzdf=4*100*zzqz when zzwc<'''+floattostr(jh)+''' and zzwc>='''+floattostr(yb)+''' then zzdf=3*100*zzqz');
sql.Add('zzwc<'''+floattostr(yb)+''' and zzwc>='''+floattostr(jc)+''' then zzdf=2*100*zzqz when zzwc<'''+floattostr(jc)+''' and zzwc>='''+floattostr(zc)+''' then zzdf=100*zzqz when zzwc=0 then zzdf=0');
prepared;
showmessage(sql.Text);
open;
在程序运行中报 select 第一行=附近语法错误。第一次在 delphi中使用 update set when then 语句,请高手指点,困惑中........