Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

AccessºÍSQL2000ÖÐÓï¾äµÄÇø±ð

1 £¬¶ÔÓÚÈÕÆÚ×Ö¶Î×Ö¶Î
access±íʾΪ£º#1981-28-12#
SQLSERVER2000±íʾΪ£º''1981-02-12''
2,SQLÓï¾äÇø±ð£¬select ,update ÔÚ¶Ôµ¥±í²Ù×÷ʱ¶¼²î²»¶à£¬
µ«¶à±í²Ù×÷ʱupdateÓï¾äµÄÇø±ðACCESSÓëSQLSERVERÖеÄUpdateÓï¾ä¶Ô±È:
SQLSERVERÖиüжà±íµÄUpdateÓï¾ä:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Where a.ID = b.ID;
ͬÑù¹¦ÄܵÄSQLÓï¾äÔÚACCESSÖÐÓ¦¸ÃÊÇ
Update Tab1 a,Tab2 b
SET a.Name = b.Name
Where a.ID = b.ID;
¼´:ACCESSÖеÄUpdateÓï¾äûÓÐfrom×Ó¾ä,ËùÓÐÒýÓÃµÄ±í¶¼ÁÐÔÚUpdate¹Ø¼ü×Öºó.
¸üе¥±íʱ£º¶¼Îª£º
Update table1 set ab='12',cd=444 where ....
3,deleteÓï¾ä
accessÖÐɾ³ýʱÓÃ:delete * from table1 where a>2 ¼´Ö»Òª°Ñselect Óï¾äÀïµÄselect »»³Édelete¾Í¿ÉÒÔÁË¡£
sqlserve ÖÐÔòΪ: delete from table1 where a>2 ¼´Ã»ÓÐ*ºÅ
4£¬as ºóÃæµÄ¼ÆËã×Ö¶ÎÇø±ð
accessÖпÉÒÔÕâÑù£ºselect a,sum(num) as kc_num,kc_num*num as all_kc_num ¼´¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
sqlserver ÖÐÔòΪ£ºselect a,sum(num) as kc_num,sum(num)*num as all_kc_num ¼´²»¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
5£¬[.]Óë[!]µÄÇø±ð
accessÖжà±íÁªºÏ²éѯʱ£ºselect tab1!a as tab1a,tab2!b tab2b from tab1,tab2 ,ÖмäµÄAS¿ÉÒÔ²»Òª¡£
¡¡sqlserve ÖÐÔò£ºselect tab1.a as tab1a,tab2.b tab2b from tab1,tab2 ,ÖмäµÄAS¿ÉÒÔ²»Òª¡£
6,ÁªºÏ²éѯʱ£¬
¡¡¡¡ accessÖжà±íÁªºÏ²éѯ:'select a,b from(
select a,b from tab1 where a>3 union select c,d from tab2 ) group by a,b
sqlserve ÖÐÔò'select a,b from(
select a,b from tab1 where a>3 union select c,d from tab2 ) tmptable group by a,b¼´Òª¼ÓÒ»¸öÐéµÄ±ítmptable£¬±íÃûÈÎÒâ¡£---
7£¬accessÉý¼¶µ½sqlserverʱ£¬
¡¡¡¡¿ÉÒÔÓÃsqlserverµÄÊý¾Ýµ¼È빤¾ßµ¼ÈëÊý¾Ý£¬µ«Òª×ö±ØÒªµÄ´¦Àí¡£
¡¡¡¡accessÖеÄ×Ô¶¯±àºÅ£¬²»»á×Ô¶¯×ª»»SQLÖеÄ×Ô¶¯±àºÅ£¬Ö»ÄÜת»»ÎªintÐÍ£¬Òª°ÑËüÊÖ¹¤¸Ä³É±êʶ×ֶΣ¬ÖÖ×ÓΪ1£¬°ÑËùÓе¼Èë±»sqlserverת»¯³ÉµÄÒÔn¿ªÍ·µÄ×Ö¶ÎÀàÐ͵ÄnÈ¥µô£¬Èçnvarchar->varchar.°ÑÐèÒªÓÐÃëÀàÐ͵ÄÈÕÆÚ×ֶθijÉdatatimeÀàÐÍ£¨SQL»á°ÑËùÓеÄÈÕÆÚ¿ª×ª»¯³ÉsmalldatetimeÐÍ£©
8,trueÓë1=1
accessÓÃwhere true±íʾÌõ¼þΪÕæ,
sqlserverÓÃwhere 1=1±íʾÌõ¼þΪÕæ
9,ÅжÏ×Ö¶ÎֵΪ¿ÕµÄÇø±ð
ÆÕͨ¿Õ£º
AccessºÍsql serverÒ»Ñù where co


Ïà¹ØÎĵµ£º

Access ·ÖÒ³²éѯ

   ×Ô¼º×öµÄÒ»¸ö.net´íÎóÊÕ¼¯£¬ÊÕ¼¯ÕûÕ¾µÄ500´íÎó£¬ÓõÄaccessÊý¾Ý¿â¡£Êý¾Ý¹ý20000ºó£¬Ê¹Óô«Í³µÄSELECT TOP 10 * from TABLE WHERE ID NOT IN(SELECT TOP 10*10 * from TABLE)²éѯ¾¹È»ÒªºÃ¼¸·ÖÖÓ£¬º¹~~~~£¡
   ÍøÉϲ鵽µÄÒ»ÌõÓï¾ä»¹²»´í¡£
    SELECT TOP 10 id,Message,CreateTime ......

SQL2005ºÍ(Excel |access)Ö®¼äµÄÊý¾Ýµ¼Èëµ¼³ö


Sql´úÂë
--²ÉÓÃSQLÓï¾äʵÏÖsql2005ºÍExcel Êý¾ÝÖ®¼äµÄÊý¾Ýµ¼Èëµ¼³ö£¬ÔÚÍøÉÏÕÒÀ´Ò»--Ï£¬ÊµÏÖ·½·¨ÊÇÕâÑùµÄ£º    
  
  
--Excel---->SQL2005  µ¼È룺    
  
  
select * into useinfo from O ......

ÓÃVFPÁгöACCESSËùÓбíµÄ×ֶνṹ£¬º¬±êÌâ¡£

     set safety off
     local oo,lcStr,lcMdbFile,i,x,lnFields,lcTableName,lnFieldtype,lcCurdir
     lcCurdir = sys(5) + curdir()
     lcNowdir = getdir()
     cd (lcNowdir)
   &nb ......

SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»»

ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ