Ò»Ìõ¡¡¼òµ¥ SqlÓï¾äÎÊÌâ(SqlServer»·¾³)
select source_id,deposit_comp,comp_phone,comp_addr,deposit_client,client_phone,sum(total_amt)
from sale_card_request
group by source_id,deposit_comp,comp_phone,comp_addr,deposit_client,client_phone
sale_card_request Óиö req_date µÄ×ֶΣ¬±ÈÈçÎÒÏë²é req_date between '2000-1-1' and '2010-1-1' Õâ¼äµÄÊý¾Ý²¢ÇÒʹÓÃÉÏÃæµÄ·Ö×éÔõôʵÏÖ£¿
delphi
Delphi(Pascal) code:
with ADOQuery do
begin
close;
sql.add('select source_id,deposit_comp,comp_phone,comp_addr,deposit_client,client_phone,sum(total_amt)');
sql.add('from sale_card_request');
sql.add('where req_date>='+QuotedStr('2000-1-1')+' and req_date<='+QuotedStr('2000-1-1'));//QuotedStrÖпÉÒÔÌæ»»³É±äÁ¿,×Ö·ûÐÍ
sql.add('group by source_id,deposit_comp,comp_phone,comp_addr,deposit_client,client_phone');
open
end;
Ïà¹ØÎÊ´ð£º
access ÖÐÖ´ÐÐsql updateÓï¾äʱÓÐʱºò³É¹¦ÓÐʱºò²»³É¹¦£¬µ«ÊÇaccessÖв»³ö´íÎóÐÅÏ¢£¬²»ÖªµÀÊÇʲôÔÒò£¬ÓÐÄÄλ´óÏÀÖªµÀ£¬Çë°ïæ°¡
ÌùSQLÓï¾ä£¬¼ì²é±í¡¢×ֶεÄÓÐЧÐÔÉèÖÃ
sql ÔÚ²éѯ·ÖÎöÆ÷ÀïÃæ Ö´ÐкÜÕý³£
ÊÇ ......
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
СµÜÏÖÔÚSwingÔÚÁ¬½ÓÊý¾Ý¿âÉÏÓöµ½Ò»µãÎÊÌ⣬ÇëÎÊSwingÀïÃæµÄʼþºÍSQLserverÊý¾Ý¿âµÄÁ¬½ÓÓÐʲôºÃµÄ×ÊÁÏÊéÍÆ¼öÂð£¿
Õâ¸öÓ¦µ±Ã»ÓÐÊ²Ã´ÌØ±ð,ÓëÆäËûµÄ±à³ÌÒ»Ñù.
JDBC
ÇëÎÊÔÚSwingÖмÓÔØ±³¾°Í¼Æ¬ÊÇÔõô¼ÓµÄ£¿
......
ÏÖÔÚÓÐÒ»ORACLEÖеÄSQLÓï¾ä£¬ÐèÒªÒÆÖ²µ½DB2ÖУ¬ÇëÎʸÃSQL¸ÄÈçºÎд
ORACLEÖУº
select floor(months_between(date1,date2)) from A
date1,date2·Ö±ðΪ±íÖеÄÁ½¸ö×Ö¶Î £¬¶¼ÎªÈÕÆÚÐÍ
DB2ÖÐÈçºÎʹÓÃÐ ......