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

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


Sql´úÂë
--²ÉÓÃSQLÓï¾äʵÏÖsql2005ºÍExcel Êý¾ÝÖ®¼äµÄÊý¾Ýµ¼Èëµ¼³ö£¬ÔÚÍøÉÏÕÒÀ´Ò»--Ï£¬ÊµÏÖ·½·¨ÊÇÕâÑùµÄ£º    
  
  
--Excel---->SQL2005  µ¼È룺    
  
  
select * into useinfo from OPENROWSET('MICROSOFT.JET.OLEDB.4.0' ,'Excel 5.0;HDR=YES;DATABASE=d:\db.xls',sheet1$);    
  
  
  
--ÆäÖУ¬useinfo ÊÇÊý¾Ý¿âÖеÄÒ»¸ö±í£¬d:\db.xls ÎªÊý¾ÝÔ´£¬ÖµµÃÌá³öµÄÊÇ£º--sheet1$£¬¼ÇµÃ¼ÓÉÏ$¡£    
  
  
---SQL2005--->Excel  µ¼³ö£º    
  
  
insert into OPENROWSET('MICROSOFT.JET.OLEDB.4.0' ,'Excel 5.0;HDR=YES;DATABASE=d:\test.xls',sheet1$) select * from useinfo;    
  
  
  
  
--н¨Ò»¸ötest.xml Îļþ£¬ÆäÖÐtest.xmlµÄsheet1 µÄ±íÍ·±ØÐëÒªºÍuseinfoµÄÁÐ----ÃûÏàÒ»ÖÂ.    
  
  
  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
  
  
----¸½ÉÏaccessµÄ    
  
  
insert into OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\test.mdb','select * from useinfo')    
select * from useinfo;    
----------------------------------------------------------------------------    
select * into hi from     
OpenRowSet('microsoft.jet.oledb.4.0',';database=d:\test.mdb','select * from useinfo')    
  
  
  
``````````````````````````````````````````    


Ïà¹ØÎĵµ£º

SQL Server BI Step by Step SSIS 7 (End)

ºÍÆäËü³ÌÐòÒ»Ñù£¬SSIS°üͬÑùÐèÒª½¡×³£¬Îȶ¨µÄÔËÐУ¬ÕâÑùµÄ³ÌÐò²ÅÓпɿ¿ÐԺͿÉÉìËõÐÔ¡£SSISÌṩÁËÈçÏ·½ÃæµÄÖ§³Ö:
        1.ÊÂÎñ: ¿ÉÒÔ¶ÔÒ»¸ö³ÌÐò°üÉèÖóÉÒ»¸ö»òÕ߶à¸öÊÂÎñ£¬ÉõÖÁ¿ÉÒÔ¶ÔÁ½¸ö³ÌÐò°üÉèÖóÉÒ»¸öÊÂÎñ¡£ÎªÁ˱£Ö¤Êý¾ÝµÄÒ»ÖÂÐÔ£¬Ä㻹¿ÉÒÔDTCÊÂÎñ»òÕßSQL ServerÒýÇ漶µÄÊÂÎñ¡£ ......

ÇÉÓÃSQL ServerÈÕÆÚÀàÐÍÊý¾Ý¶þ½øÖÆÊä³ö¼ÆËãʱ¼ä²î

1¡¢SQL ServerÈÕÆÚÊý¾Ý¿âÄÚ²¿±íʾ¼°²éѯÊä³ö£º
SQL ServerÄÚ²¿¶ÔDateTimeÀàÐ͵ıíʾÊÇÓÃ8¸ö×Ö½ÚÀ´±íʾ£¬ÆäÖÐÇ°4¸ö×Ö½Ú±íʾµÄÊýֵΪ×Ô1900Äê1ÔÂ1ÈÕÁãʱÒÔÀ´µÄÌìÊý£¬ºóËĸö×Ö½ÚÊÇÌìÊýÖ®ÍâµÄÓжàÉÙ¸ö1/300Ã룬ÕâҲ˵Ã÷SQL ServerÄÚ²¿±íʾʱ¼äµÄ¾«¶ÈΪ1/300Ã룬Լ3.3ºÁÃë¡£
³£¹æµÄSQL²éѯ£¬Õý³£ÈÕÆÚÊä³ö¸ñʽΪ:yyyy-MM-dd hh: ......

SQL express °²×°Êֲᣭ°²×°

2¡¢sql express °²×° Èç¹ûÔÚXPÏ£¬Ö±½ÓË«»÷°²×°¾ÍºÃÁË¡£ ÏÈ°²×° [ÔÚvistaÏÂÈç¹ûÖ±½ÓË«»÷¿ÉÄÜ»á³öÏÖ °²×°sql server express ³ö´í29506 ] [Vista°²×°µÄʱºò£¬ÐèҪʹÓá°ÒÔ¹ÜÀíÔ±Éí·ÝÔËÐС±°²×°] SQLServer2005_SSMSEE.msi°²×°½áÊø   studioÒѾ­°²×°ÉÏÈ¥£¬µ«ÊÇÄãÓÐûÓз¢ÏÖ£¬°²×°sqlµÄʱºòûÓз¢ÏÖÓÐÓû§saµÄà ......

Sql µãµÎ

ID int identity(1,1) primary key ×Ô¶¯Ôö³¤,Ö÷¼ü
EXEC sp_rename 'login_info','PDI_login_info'  Ö´Ðд洢¹ý³Ì sp_rename , ½«login_info±íÃû ¸ü¸ÄΪ PDI_login_info
SET   XACT_ABORT  {ON|OFF} Èç¹ûÊÂÎñÖз¢Éú´íÎó£¬on   Ôò»áÖÕÖ¹Õû¸öÊÂÎñµÄÖ´ÐУ¬Èç¹ûOFF£¬¼ÌÐø´íÎóµÄÏÂÃæÒ»¾ä  
SET &nbs ......

ADOX´´½¨AccessÓû§ºÍ×é

// BeginGroupCpp.cpp
// compile with: /EHsc
#import "msadox.dll" no_namespace
#include "iostream"
using namespace std;
inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);};
int main() {
   if (FAILED(::CoInitialize(NULL)) )
      return -1;
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ