¹ØÓÚgroup byµÄsqlÓï¾ä£¿
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ÖеÄÓï¾ä£¬ÔËÐÐʱ£¬ÀÏÊDZ¨ora-00979 ²»ÊÇ group by ±í´ïʽ?
ORA-00979 not a GROUP BY expression
Cause: The GROUP BY clause does not contain all the expressions in the SELECT clause. SELECT expressions that are not included in a group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, must be listed in the GROUP BY clause.
Action: Include in the GROUP BY clause all SELECT expressions that are not group function arguments.
ÈôÊǸÄΪselect bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd¡®2004¡¯group by bgqxcode ÔÚ sql plus ÖÐÄÜÕý³£ÔËÐÐ
"´øÓÐ group by ×Ó¾äµÄ²éѯÖÐµÄ select ×Ö¶ÎÁбíÖУ¬³ýÁ˰üº¬ÔÚ group by ÖеÄ×ֶΣ¬ÆäËû×ֶζ¼ÒªÇó×÷Ϊ group function £¨±ÈÈç AVG, COUNT, MAX, MIN, SUM £©µÄ²ÎÊý³öÏÖ£¬ÄãµÄ×Ó²éѯΥ×÷ΪÖ÷²éѯµÄÒ»¸ö×Ö¶ÎÎ¥·´ÁËÕâ¸ö¹æÔòÁË¡£"
ÈôÊǸÄΪselect bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd='2004' group by bgqxcode ÔÚ sql plus ÖÐÄÜÕý³£ÔËÐÐ
bobo_916 ÄܰïÎÒ¸ÄÏÂÕâÌõSQLÓï¾äÂð£¿Ð»Ð»
Óï¾ä±¾ÉíûÓÐÎÊÌâ
ÊÔÊÔÓÃd
Ïà¹ØÎÊ´ð£º
....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷ÔÀ´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......
¾ÍÊÇÕ¹¿ªreplication ÓÒ¼üµ¥»÷ local Subscription ´´½¨·¢²¼£¬ ÓÐÈËÓùýÂ𣬳ɹ¦´´½¨·¢²¼µÄÓÐÂð£¿
Óùý£¬¿ÉÒԳɹ¦
ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦
Ã×ÓùýµÄ°ï¶¥
ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦
µÚÒ»²½ÎҾ͹ý² ......
ÎÒµÄÊý¾Ý¿âµÄ±íÊǶ¯Ì¬µÄ±í,ÔÚÌí¼ÓÊý¾ÝµÄʱºòÓÐÒ»¸ö×Ö¶ÎÊÇDATETIMEÊý¾ÝÀàÐ͵Ä,ÏÂÃæÊÇ´æ´¢¹ý³Ì
if exists (select * from sysobjects where name='proc_ADD_Order')
drop proc proc_ADD_Order
go
......
ÏÖÔÚÓбíA£¨barcode varchar2£¬length number£©£¬B£¨barcode varchar2£¬serial number£©ÆäÖÐbarcode¹ØÁªA:BΪ1£ºn
ÓÐÈçÏÂsqlÓï¾ä
insert into a values('b1',10)
insert into a values( ......
¸÷λ´óÏÀ£¬ÎÒÓÐÒ»¸öxmlÎļþ
XML code:
<?xml version="1.0" encoding="GB2312"?>
<FileId fileid="86">
<ResultSet>
<row id="0">
......