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

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

Ò»¡¢           SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡3ÔÚChoose a Data Source£¨Ñ¡ÔñÊý¾ÝÔ´£©¶Ô»°¿òÖÐÑ¡ÔñMicrosoft Access as the Source£¬È»ºó¼üÈëÄãµÄ.mdbÊý¾Ý¿â(.mdbÎļþÀ©Õ¹Ãû)µÄÎļþÃû»òͨ¹ýä¯ÀÀÑ°ÕÒ¸ÃÎļþ¡£
¡¡¡¡4ÔÚChoose a Destination£¨Ñ¡ÔñÄ¿±ê£©¶Ô»°¿òÖУ¬Ñ¡ÔñMicrosoft OLE¡¡DB Prov ider for SQL¡¡Server£¬Ñ¡ÔñÊý¾Ý¿â·þÎñÆ÷£¬È»ºóµ¥»÷±ØÒªµÄÑéÖ¤·½Ê½¡£
¡¡¡¡5ÔÚSpecify Table Copy£¨Ö¸¶¨±í¸ñ¸´ÖÆ£©»òQuery£¨²éѯ£©¶Ô»°¿òÖУ¬µ¥»÷Copy tables£¨¸´ÖƱí¸ñ£©¡£
6ÔÚSelect Source Tables£¨Ñ¡ÔñÔ´±í¸ñ£©¶Ô»°¿òÖУ¬µ¥»÷Select All£¨È«²¿Ñ¡¶¨£©¡£ÏÂÒ»²½£¬Íê³É¡£
 
Transact-SQLÓï¾ä½øÐе¼Èëµ¼³ö£º
1.         ÔÚSQL SERVERÀï²éѯaccessÊý¾Ý:
-- ======================================================
SELECT *
from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:"DB.mdb";User ID=Admin;Password=')...±íÃû
Àý×Ó£º
SELECT *
from OpenDataSource('Microsoft.Jet.OLEDB.4.0',
      'Data Source="d:\ipaddress.mdb";User ID=Admin;Password=' )...[1]        //1ÊDZíÃû
-------------------------------------------------------------------------------------------------
2.         ½«accessµ¼ÈëSQL server
-- ======================================================
ÔÚSQL SERVER ÀïÔËÐÐ:
SELECT *
INTO newtable
from OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0',
      'Data Source="c:"DB.mdb";User ID=Admin;Password=' )...±íÃû
Àý×Ó£º
SELECT *
INTO newtable
from OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0',
      'Data Source="d:\ipaddress.mdb";User ID=Admin;Password=' )...[1]
----------------------------------------------------


Ïà¹ØÎĵµ£º

Ó°ÏìSQL serverÐÔÄܵĹؼüÈý¸ö·½Ãæ

1 Âß¼­Êý¾Ý¿âºÍ±íµÄÉè¼Æ
Êý¾Ý¿âµÄÂß¼­Éè¼Æ¡¢°üÀ¨±íÓë±íÖ®¼äµÄ¹ØϵÊÇÓÅ»¯¹ØϵÐÍÊý¾Ý¿âÐÔÄܵĺËÐÄ¡£Ò»¸öºÃµÄÂß¼­Êý¾Ý¿âÉè¼Æ¿ÉÒÔΪ
ÓÅ»¯Êý¾Ý¿âºÍÓ¦ÓóÌÐò´òÏÂÁ¼ºÃµÄ»ù´¡¡£
±ê×¼»¯µÄÊý¾Ý¿âÂß¼­Éè¼Æ°üÀ¨ÓöàµÄ¡¢ÓÐÏ໥¹ØϵµÄÕ­±íÀ´´úÌæºÜ¶àÁеij¤Êý¾Ý±í¡£ÏÂÃæÊÇһЩʹÓñê×¼»¯
±íµÄһЩºÃ´¦¡£
A:ÓÉÓÚ±íÕ­£¬Òò´Ë¿ÉÒÔʹŠ......

[SQL Server2008]MDX²éѯÓï¾ä

ÔÚEssbaseÖÐʹÓÃMDXÖ»ÄÜÓÃÓÚ²éѯ£¬Éв»ÄÜÀ´²Ù×÷Cube£¨MS SSASÖпÉÒÔʹÓÃMDXÀ´²Ù×÷CubeµÄ£©£¬ËùÒÔÕâÀïֻѧϰMDXµÄSelectÓï¾ä¡£
 
ÔÚѧϰµÄ¹ý³ÌÖУ¬ÎÒ¾õµÃ×îÓÐÄѶȵĵط½ÓÐÁ½¸ö¡£
Ò»ÊÇ£¬¶ÔOLAP¶àάµÄÀí½â¡£ÈçͬѧϰSQLÒ»Ñù£¬SQL×÷ÓõĶÔÏóÊÇ±í£¬±íµÄ½á¹¹¶¼ÊǶþάµÄ£¬±êʶÐÐÁм´¿É£»µ«ÊÇMDX×÷ÓõĶÔÏóÊǶàάÊý¾Ý¿â£¬ÄÇ ......

Sql Get Last Day of Month...

-- Sql Get Last Day of Month...
 SELECT     (CASE   MONTH(GETDATE())
                WHEN 1 THEN 31
             &nbs ......

SQL¾­µä¶ÌС´úÂëÊÕ¼¯

--SQL Server£º
Select TOP N * from TABLE Order By NewID() 
--Access£º
Select TOP N * from TABLE Order By Rnd(ID)  
Rnd(ID) ÆäÖеÄIDÊÇ×Ô¶¯±àºÅ×ֶΣ¬¿ÉÒÔÀûÓÃÆäËûÈκÎÊýÖµÀ´Íê³É£¬±ÈÈçÓÃÐÕÃû×Ö¶Î(U ......

ASP.NETÖÐÈçºÎ·À·¶SQL×¢Èëʽ¹¥»÷

1½«sqlÖÐʹÓõÄһЩÌØÊâ·ûºÅ£¬Èç' -- /* ; %µÈÓÃReplace()¹ýÂË£»
2ÏÞÖÆÎı¾¿òÊäÈë×Ö·ûµÄ³¤¶È£»
3¼ì²éÓû§ÊäÈëµÄºÏ·¨ÐÔ£»¿Í»§¶ËÓë·þÎñÆ÷¶Ë¶¼ÒªÖ´ÐУ¬¿ÉÒÔʹÓÃÕýÔò¡£
4ʹÓôø²ÎÊýµÄSQLÓï¾äÐÎʽ¡£ 
ASP.NETÖÐÈçºÎ·À·¶SQL×¢Èëʽ¹¥»÷ 
 
Ò»¡¢Ê²Ã´ÊÇSQL×¢Èëʽ¹¥»÷£¿
¡¡¡¡ËùνSQL×¢Èëʽ¹¥»÷£¬¾ÍÊǹ¥»÷Õß°Ñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ