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

SQL*LoaderʹÓÃÖ¸ÄÏ

Oracle µÄSQL*LOADER¿ÉÒÔ½«ÍⲿÊý¾Ý¼ÓÔص½Êý¾Ý¿â±íÖС£ÏÂÃæÊÇSQL*LOADERµÄ»ù±¾Ìص㣺
1£©ÄÜ×°È벻ͬÊý¾ÝÀàÐÍÎļþ¼°¶à¸öÊý¾ÝÎļþµÄÊý¾Ý
2£©¿É×°Èë¹Ì¶¨¸ñʽ£¬×ÔÓɶ¨½çÒÔ¼°¿É¶È³¤¸ñʽµÄÊý¾Ý
3£©¿ÉÒÔ×°Èë¶þ½øÖÆ£¬Ñ¹ËõÊ®½øÖÆÊý¾Ý
4£©Ò»´Î¿É¶Ô¶à¸ö±í×°ÈëÊý¾Ý
5£©Á¬½Ó¶à¸öÎïÀí¼Ç¼װµ½Ò»¸ö¼Ç¼ÖÐ
6£©¶ÔÒ»µ¥¼Ç¼·Ö½âÔÙ×°Èëµ½±íÖÐ
7£©¿ÉÒÔÓà Êý¶ÔÖƶ¨ÁÐÉú³ÉΨһµÄKEY
8£©¿É¶Ô´ÅÅÌ»ò ´Å´øÊý¾ÝÎļþ×°ÈëÖƱíÖÐ
9£©ÌṩװÈë´íÎ󱨸æ
10£©¿ÉÒÔ½«ÎļþÖеÄÕûÐÍ×Ö·û´®£¬×Ô¶¯×ª³ÉѹËõÊ®½øÖƲ¢×°ÈëÁбíÖС£
1.2¿ØÖÆÎļþ
¿ØÖÆÎļþÊÇÓÃÒ»ÖÖÓïÑÔдµÄÎı¾Îļþ£¬Õâ¸öÎı¾ÎļþÄܱ»SQL*LOADERʶ±ð¡£SQL*LOADER¸ù¾Ý¿ØÖÆÎļþ¿ÉÒÔÕÒµ½ÐèÒª¼ÓÔصÄÊý¾Ý¡£²¢ÇÒ·ÖÎöºÍ½âÊÍÕâЩÊý¾Ý¡£¿ØÖÆÎļþÓÉÈý¸ö²¿·Ö×é³É£º
l È«¾ÖÑ¡¼þ£¬ÐУ¬Ìø¹ýµÄ¼Ç¼ÊýµÈ£»
l INFILE×Ó¾äÖ¸¶¨µÄÊäÈëÊý¾Ý£»
l Êý¾ÝÌØÐÔ˵Ã÷¡£
1.3ÊäÈëÎļþ
¶Ô ÓÚ SQL*Loader, ³ý¿ØÖÆÎļþÍâ¾ÍÊÇÊäÈëÊý¾Ý¡£SQL*Loader¿É´ÓÒ»¸ö»ò¶à¸öÖ¸¶¨µÄÎļþÖжÁ³öÊý¾Ý¡£Èç¹û Êý¾ÝÊÇÔÚ¿ØÖÆÎļþÖÐÖ¸¶¨£¬¾ÍÒªÔÚ¿ØÖÆÎļþÖÐд³É INFILE * ¸ñʽ¡£µ±Êý¾Ý¹Ì¶¨µÄ¸ñʽ£¨³¤¶ÈÒ»Ñù£©Ê±ÇÒÊÇÔÚÎļþÖеõ½Ê±£¬ÒªÓÃINFILE “fix n”
load data
infile ‘example.dat’ “fix 11″
into table example
fields terminated by ‘,’ optionally enclosed by ‘”‘
(col1 char(5),
col2 char(7))
example.dat:
001, cd, 0002,fghi,
00003,lmn,
1, “pqrs”,
0005,uvwx,
µ±Êý¾ÝÊǿɱä¸ñʽ£¨³¤¶È²»Ò»Ñù£©Ê±ÇÒÊÇÔÚÎļþÖеõ½Ê±£¬ÒªÓÃINFILE “var n”¡£È磺
load data
infile ‘example.dat’ “var 3″
into table example
fields terminated by ‘,’ optionally enclosed by ‘”‘
(col1 char(5),
col2 char(7))
example.dat:
009hello,cd,010world,im,
012my,name is,
1.4»µÎļþ
»µÎļþ°üº¬ÄÇЩ±»SQL*Loader¾Ü¾øµÄ¼Ç¼¡£±»¾Ü¾øµÄ¼Ç¼¿ÉÄÜÊDz»·ûºÏÒªÇóµÄ¼Ç¼¡£
»µÎļþµÄÃû×ÖÓÉ SQL*LoaderÃüÁîµÄBADFILE ²ÎÊýÀ´¸ø¶¨¡£
1.5ÈÕÖ¾Îļþ¼°ÈÕÖ¾ÐÅÏ¢
µ±SQL*Loader ¿ªÊ¼Ö´Ðкó£¬Ëü¾Í×Ô¶¯½¨Á¢ ÈÕÖ¾Îļþ¡£ÈÕÖ¾Îļþ°üº¬ÓмÓÔصÄ×ܽᣬ¼ÓÔØÖеĴíÎóÐÅÏ¢µÈ¡£
¿ØÖÆÎļþÓï·¨
¿ØÖÆÎļþµÄ¸ñʽÈçÏ£º
OPTIONS £¨ { [SKIP=integer] [ LOAD = integer ]
[ERRORS = integer] [ROWS=integer]
[BINDSIZE=integer] [SILE


Ïà¹ØÎĵµ£º

Ãû´ÎËã·¨(sql server)(ת×Ô£º°®Ð¾õÂÞ.ع»ª)

±íjh03ÓÐÏÂÁÐÊý¾Ý£º
name¡¡score
aa¡¡¡¡99
bb¡¡¡¡56
cc¡¡¡¡56
dd¡¡¡¡77
ee¡¡¡¡78
ff¡¡¡¡76
gg¡¡¡¡78
ff¡¡¡¡50
1. Ãû´ÎÉú³É·½Ê½1,ScoreÖظ´Ê±ºÏ²¢Ãû´Î
SELECT *¡¡,¡¡Place=(SELECT COUNT(DISTINCT Score) from jh03 WHERE Score >= a.Score)
from jh03 a
ORDER BY Place
½á¹û
Name Score Pla ......

MS SQL Server 2000 ¸´ÖÆ·þÎñÆ÷Òì³£½â¾ö

½ñÌìÐÞ¸ÄÁËÊý¾Ý¿â£¬ÓÚÊǽøÐÐÖØз¢²¼ºÍ¶©ÔÄ£¬Í»È»³öÏÖÁËÒÔÏÂÒì³£
½ø³ÌδÄÜ´óÈÝÁ¿¸´ÖƵ½±í"XS_DDML"ÖÐ
´íÎóÏêϸÐÅÏ¢£º
ÔÚ BCP Êý¾ÝÎļþÖÐÓöµ½µÄÒâÍâµÄ EOF
(Ô´: ODBC SQL Server Driver (ODBC); ´íÎó´úÂë: S1000)
ÓÚÊDzé°ïÖú£¬²éGoogle,ºÇºÇ£¬Google»¹ÕæÊǸöºÃµØ·½£¬ÕÒµ½ÁËÒÔÏÂSQL£¬¾Ý˵¿ÉÒÔ½â¾ö¸ÃÎÊÌâ
sp_configure&n ......

SQL ServerÖÐʹÓÃCLRµ÷ÓÃ.NET·½·¨

½éÉÜ
ÎÒÃÇÒ»ÆðÀ´×ö¸öʾÀý£¬ÔÚ.NETÖÐн¨Ò»¸öÀ࣬²¢ÔÚÕâ¸öÀàÀïн¨Ò»¸ö·½·¨£¬È»ºóÔÚSQL ServerÖе÷ÓÃÕâ¸ö·½·¨¡£°´ÕÕ΢ÈíËùÊö£¬Í¨¹ýËÞÖ÷ Microsoft .NET Framework 2.0 ¹«¹²ÓïÑÔÔËÐпâ (CLR)£¬SQL Server 2005ÏÔÖøµØÔöÇ¿ÁËÊý¾Ý¿â±à³ÌÄ£ÐÍ¡£ ÕâʹµÃ¿ª·¢ÈËÔ±¿ÉÒÔÓÃÈκÎCLRÓïÑÔ£¨ÈçC#¡¢VB.NET»òC++µÈ£©À´Ð´´æ´¢¹ý³Ì¡¢´¥·¢Æ÷ºÍÓ ......

SQL server 2000 ÈçºÎÅжÏÁÙʱ±íÊÇ·ñ´æÔÚ


 
 
1.ÅжÏÒ»¸öÁÙʱ±íÊÇ·ñ´æÔÚ
if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tempcitys') and type='U')
   drop table #tempcitys
×¢ÒâtempdbºóÃæÊÇÁ½¸ö. ²»ÊÇÒ»¸öµÄ
---ÁÙʱ±í
if exists(select * from tempdb..sysobjects where name like &lsqu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ