with adod_dict do begin close; commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; parameters[0].DataType:=ftstring; parameters[0].Value:=trim(cbtjnd.Text); open; end;
ÒÔÉÏÊÇdelphiÖеÄÓï¾ä£¬ORACLEÊý¾Ý¿â£¬ÔËÐÐʱ£¬ÀÏÊDZ¨ora-00979 ²»ÊÇ group by ±í´ïʽ?
ÈôÊý¾Ý¿â»»³É SQL SERVER¾ÍÄÜÕý³£ÔËÐÐ! ÄãÄÇÌõSQLÓï¾äÊDZê×¼µÄSQLÓÖ²»ÊÇPL/SQL²»ÖÁÓÚÔÚOracle DB¾Í²»ÐÐÁË°É,¶øÇÒÄÇÌõÓï¾äҲû´í°¡ with adod_dict do begin close; commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd='+quotedstr(cbtjnd.Text)+' group by bgqxcode'; open; end;
ÕâÑùÊÔÊÔ with adod_dict do begin close; commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd='+''''+trim(cbtjnd.text)+''''+' group by bgqxcode'; open; end; ¸Ä³ÉÒÔÉÏÊÇ¿ÉÒÔÕýÈ·ÔËÐУ¬ÎªÊ²Ã´¼Ó²ÎÊý¾Í²»ÐÐÄØ£¿