ACCESSµÈ¿âʵÏÖÖðÈÕͳ¼Æ - MS-SQL Server / »ù´¡Àà
±í½á¹¹:
table1
Ö¤¼þºÅ ʱ¼ä
X31 2010-01-11
3BC 2010-02-03
3AD 2010-02-03
F23 2010-02-09
......
ÏÖÔÚҪͳ¼ÆÒ»¸öʱ¼ä¶ÎÈç 2010-01-09 µ½ 2010-02-09¼äµÄÊý¾Ý,
ÆÚ´ý½á¹û:
ÈÕÆÚ ÊýÁ¿
2010-01-09 0
2010-01-10 0
2010-01-11 1
2010-01-12 0
...
2010-02-09 1
¾ÍÊÇ˵ÿÌì¶¼ÊÇÒ»ÐмǼ.
ACCESSÈçºÎʵÏÖ, MSSQLºÍORACLEÓÖÈçºÎʵÏÖ,»¶Ó´ó¼ÒÅÄש
SQL code:
select convert(varchar(20),ʱ¼ä,120),count(*)
from tb
group by convert(varchar(20),ʱ¼ä,120)
OK,ÎÒÔõô¾Í°ÑdateaddÍüÁË,
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
¿ÉÄÜÒòΪ¹¤×÷µÄÔÒò ½Ó´¥Êý¾Ý¿âÕâ¿é±È½ÏÉÙ£¬Ö®Ç°¶¼ÊÇ×ö³ÌÐòÕâ¿é£¬Êý¾Ý¿âÕâ¿é¶¼ÓÐרÃŵÄÈËÀ´×ö ·Ö¹¤¶¼ºÜÃ÷ϸ ËùÒÔ¶ÔÊý¾Ý¿âÕâÒ»¿éÍêÈ«²»Á˽⡣ǰ¶Îʱ¼ä È¥ÃæÊÔÁ˼¸¼Ò¹«Ë¾ ¼¸ºõ¶¼ÊÇÔÚÊý¾Ý¿âÕâ¿é¹ÒµôµÄ Á¬¸ö¼òµ¥µÄSQ ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......