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

DBF±íÓëSQL Server±íµÄµ¼Èë¡¢µ¼³ö


----------Dbf µ¼Èë Sql Server±í----------
ÒÔϾùÒÔSQL2000¡¢VFP6¼°ÒÔÉϵıíΪÀý
´úÂëµ¼È룺²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐÈçÏÂÓï¾ä(ÏÈÑ¡Ôñ¶ÔÓ¦µÄÊý¾Ý¿â)
-------------Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒÑ´æÔÚ
--Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒѾ­´æÔÚ
Insert Into ÒѾ­´æÔÚµÄSQL±íÃû Select * from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:','select * from aa.DBF')
--Ò²¿ÉÒÔ¶ÔÓ¦ÁÐÃû½øÐе¼È룬È磺
Insert Into ÒѾ­´æÔÚµÄSQL±íÃû (ÁÐÃû1,ÁÐÃû2...) Select (¶ÔÓ¦ÁÐÃû1,¶ÔÓ¦ÁÐÃû2...) from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:','select * from aa.DBF')
-------------Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±í²»´æÔÚ£¬µ¼Èëʱ´´½¨
--·½·¨Ò»£ºÓÐÒ»¸öȱµã£º°ÑDBF±íµ¼ÈëSQL ServerÖкó£¬ÂíÉÏÓÃVISUAL FOXPRO´ò¿ªDBF±í£¬»áÌáʾ“²»ÄÜ´æÈ¡Îļþ”£¬¼´Õâ¸ö±í»¹±»SQL´ò¿ª×ÅÄØ¡£¿ÉÊǹýÁË1·ÖÖÓ×óÓÒ£¬ÔÙ´ò¿ªDBF±í¾Í¿ÉÒÔÁË£¬ËµÃ÷¾­¹ýÒ»¶Îʱ¼äºó²éѯ·ÖÎöÆ÷²Å°ÑÕâ¸ö±í¹Ø±Õ¡£
Select * Into ÒªÉú³ÉµÄSQL±íÃû from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:','select * from dbf±íÃû.DBF')
--·½·¨¶þ£ºÓÐÒ»¸öȱµã£º°ÑDBF±íµ¼ÈëSQL ServerÖкó£¬ÂíÉÏÓÃVISUAL FOXPRO´ò¿ªDBF±í£¬»áÌáʾ“²»ÄÜ´æÈ¡Îļþ”£¬¼´Õâ¸ö±í»¹±»SQL´ò¿ª×ÅÄØ¡£¿ÉÊǹýÁË1·ÖÖÓ×óÓÒ£¬ÔÙ´ò¿ªDBF±í¾Í¿ÉÒÔÁË£¬ËµÃ÷¾­¹ýÒ»¶Îʱ¼äºó²éѯ·ÖÎöÆ÷²Å°ÑÕâ¸ö±í¹Ø±Õ¡£
Select * Into TEMP1 from openrowset('VFPOLEDB.1','C:';'admin';'' ,'select * from dbf±íÃû.DBF')
--Èç¹ûûÓа²×°VFP£¬ÐèÒª°Ñvfpoledb.dll¿½±´µ½SYSTEMĿ¼Ï£¬²¢×¢²á¡£
--·½·¨Èý£ºµ¼ÈëSQL SERVERºó£¬Ô´±íÔÙÓÃVFP´ò¿ª¾Í²»Ìáʾ“²»ÄÜ´æÈ¡Îļþ”£¬ËµÃ÷Óï¾äÖ´Ðкó¾Í°ÑÔ´±í¹Ø±ÕÁË¡£²»¹ýÒ²Óв»¾¡ÈËÒâµÄµØ·½£¬¾ÍÊÇÓÃÇ°Á½ÖÖ·½Ê½µ¼Èëºó£¬Ô´±íÖеÄ×Ö·ûÐÍ×ֶε¼ÈëºóSQL±í×ֶζÔÓ¦±ä³ÉNVARCHARÁË¡£
Select * Into ÒªÉú³ÉµÄSQL±íÃû from OPENROWSET('MICROSOFT.JET.OLEDB.4.0','dBase IV;HDR=NO;IMEX=2;DATABASE=c:','select * from dbf±íÃû.dbf')
--·½·¨ËÄ£ºµ¼ÈëSQL SERVERºó£¬Ô´±íÔÙÓÃVFP´ò¿ª¾Í²»Ìáʾ“²»ÄÜ´æÈ¡Îļþ”£¬ËµÃ÷Óï¾äÖ´Ðкó¾Í°ÑÔ´±í¹Ø±ÕÁË¡£²»¹ýÒ²Óв»¾¡ÈËÒâµÄµØ·½£¬¾ÍÊÇÓÃÇ°Á½ÖÖ·½Ê½µ¼Èëºó£¬Ô´±íÖеÄ×Ö·ûÐÍ×ֶε¼ÈëºóSQL±í×ֶζÔÓ¦±ä³ÉNVARCHARÁË¡£
Select * Into


Ïà¹ØÎĵµ£º

java Á¬½Ó sql 2005 µÄ·½·¨

java Á¬½Ó sql 2005 µÄ·½·¨£º
 1¡£µ½Î¢Èí¹Ù·½ÍøÕ¾ÏÂÔØ2005µÄjdbc²¢½âѹ£¬»ñµÃÎļþsqljdbc.jar
2¡£¸´ÖÆÎļþsqljdbc.jarµ½jdkĿ¼\jdk1.5\jre\lib\extÏ¡£
 3¡£¿ªÊ¼-¡µ³ÌÐò-¡µsql server 2005-¡µÅäÖù¤¾ß-¡µSQL Server Configuration Manager¡£Æô¶¯sql 2005·þÎñ¡£
µã»÷ sql server2005ÍøÂçÅäÖýڵ㣬²¢Ñ¡ÖÐ&rd ......

SQL SERVER¶¨Ê±×÷ÒµµÄÉèÖ÷½·¨

 Èç¹ûÔÚSQL Server ÀïÐèÒª¶¨Ê±»òÕßÿ¸ôÒ»¶Îʱ¼äÖ´ÐÐij¸ö´æ´¢¹ý³Ì»ò3200×Ö·ûÒÔÄÚµÄSQLÓï¾äʱ, ¿ÉÒÔÓùÜÀí->SQL Server´úÀí->×÷ÒµÀ´ÊµÏÖ¡£
¡¡¡¡1¡¢¹ÜÀí->SQL Server´úÀí->×÷Òµ(°´Êó±êÓÒ¼ü)->н¨×÷Òµ
¡¡¡¡2¡¢Ð½¨×÷ÒµÊôÐÔ(³£¹æ)->Ãû³Æ[×Ô¶¨Òå±¾´Î×÷ÒµµÄÃû³Æ]->ÆôÓõķ½¿òÄÚÊǹ´ºÅ->
·ÖÀà´¦¿ ......

sql group by Óë havingµÄÓ÷¨

1. GROUP BY ÊÇ·Ö×é²éѯ, Ò»°ã GROUP BY ÊǺ;ۺϺ¯ÊýÅäºÏʹÓÃ
group by ÓÐÒ»¸öÔ­Ôò,¾ÍÊÇ select ºóÃæµÄËùÓÐÁÐÖÐ,ûÓÐʹÓþۺϺ¯ÊýµÄÁÐ,±ØÐë³öÏÖÔÚ group by ºóÃ棨ÖØÒª£©
ÀýÈç,ÓÐÈçÏÂÊý¾Ý¿â±í£º
A    B
1    abc
1    bcd
1    asdfg
 Èç¹ûÓÐÈ ......

ÐÞ¸ÄSQL 2005Êý¾Ý¿âĬÈϲ»Çø·Ö´óСд

´´½¨µÄÊý¾Ý¿âÖÐÇø·Ö´óСд
create database test  COLLATE  Chinese_PRC_CS_AS  
Êý¾Ý¿âÖÐÇø·Ö´óСд
alter database test  COLLATE  Chinese_PRC_CS_AS 
»Ö¸´Ä¬ÈϵIJ»Çø·Ö´óСд
alter database test  COLLATE  Chinese_PRC_CI_AS ......

SQL SERVER 2005 Ö»ÓÐmdfÎļþµÄÊý¾Ý»Ö¸´·½·¨


Ò»´ÎProjectÏîĿƽ̨(PWA)ÒâÍâÍ£»úÇÒÅäÖÃÊý¾Ý¿âSharePoint_Config µÄLDF±»ÒâÍâɾ³ý,Èç¹ûÖ±½Ó¸½¼ÓMDFÎļþÔòÎÞ·¨¸½¼Ó.
Ïȳ¢ÊÔsp_attach_single_file_db»Ö¸´,Ö´ÐÐÈçÏÂ:
sp_attach_single_file_db 'SharePoint_Config','D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\SharePoint_Config.mdf'
³öÏÖ´íÎóÌáʾ:
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ