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

sqlÓï¾äµ¼Èëµ¼³ö´óÈ«

SELECT * into newtable
from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
  'Data Source="c:\aaaa.xls";User ID=Admin;Password=;Extended properties=Excel 11.0')...[Sheet1$]
/******* µ¼³öµ½excel
¡¡¡¡exec master..xp_cmdshell 'bcp settledb.dbo.shanghu out c:\temp1.xls -c -q -s"gnetdata/gnetdata" -u"sa" -p""'
¡¡¡¡/*********** µ¼Èëexcel
¡¡¡¡select * 
¡¡¡¡from opendatasource( 'microsoft.jet.oledb.4.0',
¡¡¡¡'data source="c:\test.xls";user id=admin;password=;extended properties=excel 5.0')...xactions
¡¡¡¡/*¶¯Ì¬ÎļþÃû
¡¡¡¡declare @fn varchar(20),@s varchar(1000)
¡¡¡¡set @fn = 'c:\test.xls'
¡¡¡¡set @s ='''microsoft.jet.oledb.4.0'',
¡¡¡¡''data source="'+@fn+'";user id=admin;password=;extended properties=excel 5.0'''
¡¡¡¡set @s = 'select * from opendatasource ('+@s+')...sheet1$'
¡¡¡¡exec(@s)
¡¡¡¡*/
¡¡¡¡select cast(cast(¿ÆÄ¿±àºÅ as numeric(10,2)) as nvarchar(255))+'¡¡' ת»»ºóµÄ±ðÃû
¡¡¡¡from opendatasource( 'microsoft.jet.oledb.4.0',
¡¡¡¡'data source="c:\test.xls";user id=admin;password=;extended properties=excel 5.0')...xactions
¡¡¡¡/********************** excelµ¼µ½Ô¶³Ìsql
¡¡¡¡insert opendatasource(
¡¡¡¡'sqloledb',
¡¡¡¡'data source=Ô¶³Ìip;user id=sa;password=ÃÜÂë'
¡¡¡¡).¿âÃû.dbo.±íÃû (ÁÐÃû1,ÁÐÃû2)
¡¡¡¡select ÁÐÃû1,ÁÐÃû2
¡¡¡¡from opendatasource( 'microsoft.jet.oledb.4.0',
¡¡¡¡'data source="c:\test.xls";user id=admin;password=;extended properties=excel 5.0')...xactions
¡¡¡¡/** µ¼ÈëÎı¾Îļþ
¡¡¡¡exec master..xp_cmdshell 'bcp dbname..tablename in c:\dt.txt -c -sservername -usa -ppassword'
¡¡¡¡/** µ¼³öÎı¾Îļþ
¡¡¡¡exec master..xp_cmdshell 'bcp dbname..tablename out c:\dt.txt -c -sservername -usa -ppassword'
¡¡¡¡»ò
¡¡¡¡exec master..xp_cmdshell 'bcp "select * from dbname..tablename" queryout c:\dt.txt -c -sservername -usa -ppassword'
¡¡¡¡µ¼³öµ½txtÎı¾£¬ÓöººÅ·Ö¿ª
¡¡¡¡exec master..xp_cmdshell 'bcp "¿âÃû..±íÃû" out "d:\tt.txt" -c -t ,-u sa -p password'
¡¡¡¡bulk insert ¿âÃû..±íÃû
¡¡¡¡from 'c:\test.txt'
¡¡¡¡with (
¡¡¡¡fieldterminator = ';',
¡¡¡¡


Ïà¹ØÎĵµ£º

Oracle PL\SQL ²Ù×÷£¨Èý£©Oracleº¯Êý


1.ϵͳ±äÁ¿º¯Êý
£¨1£©SYSDATE
¸Ãº¯Êý·µ»Øµ±Ç°µÄÈÕÆÚºÍʱ¼ä¡£·µ»ØµÄÊÇOracle·þÎñÆ÷µÄµ±Ç°ÈÕÆÚºÍʱ¼ä¡£
select sysdate from dual;
insert into purchase values
(‘Small Widget’,’SH’,sysdate, 10);
insert into purchase values

(‘Meduem Wodget’,’SH’, ......

OracleÊý¾Ý¿âSQL*plus³£ÓõÄÃüÁîºÍº¯Êý

 
OracleÖг£ÓõÄÃüÁîºÍº¯Êý£¬×ö¸öÕûÀí£¬ÒÔ±¸ÒÔºóÓõ½£¬·½±ã²éÔÄ¡£
 
³£ÓÃÃüÁ
 
Á¬½Ósqlplus
 
ÃüÁîÐÐÏÂÔËÐÐcmd½øÈ룬ÈçÒÔsysģʽµÇ½£¬ÃüÁîÈçÏ£º
 
(1).sqlplus "sys/zhb126 as sysdba"
 
(2).sqlplus/nolog connect sys/zhb126 as sysdba
 
(3).sqlplus scott ......

VB+SQL±àдÊý¾Ý¿â¹ÜÀíϵͳ

     ²ÎÕÕ°¸Àý½Ì³Ì½¨Á¢µÄÊý¾Ý¿â¹ÜÀíϵͳÔÚÉõ¶à·½Ã涼´æÔÚÎÊÌâ¡£¿ÉÄÜÊÇÐÂÊÖ£¬²»¹ÜÊǶÔÓÚ´óÒ»¾Íѧ¹ýµÄVB±à³Ì»¹ÊÇÕâ¸öѧÆÚ¸Õ½Ó´¥µÄSQL£¬ºÜ¶àСÎÊÌâ³£³£³öÏÖÔÚµ÷ÊÔ¹ý³ÌÖС£ÏëÇëÊìϤʹÓÃÕâÁ½¸öƽ̨µÄ¸ßÊÖ°ïæָµãһϡ£
     1.ÈçºÎ½â¾öDataGridÖжà¸öcolumnºÍSQLÖжà¸ö±íµÄ°ó¶¨£¿Ä¿µÄ ......

PHPµÄ±àдSQLÓï¾äʱ¶ÔÐèҪתÒå×Ö·ûµÄ´¦Àí

1. ¶ÔÓÚPHP magic_quotes_gpc=onµÄÇé¿ö£¬ ÎÒÃÇ¿ÉÒÔ²»¶ÔÊäÈëºÍÊä³öÊý¾Ý¿âµÄ×Ö·û´®Êý¾Ý×÷
addslashes()ºÍstripslashes()µÄ²Ù×÷,Êý¾ÝÒ²»áÕý³£ÏÔʾ¡£ Èç¹û´ËʱÄã¶ÔÊäÈëµÄÊý¾Ý×÷ÁËaddslashes()´¦Àí£¬
ÄÇôÔÚÊä³öµÄʱºò¾Í±ØÐëʹÓÃstripslashes()È¥µô¶àÓàµÄ·´Ð±¸Ü¡£ 2. ¶ÔÓÚPHP magic_quotes_gpc=off µÄÇé¿ö ±ØÐëÊ¹Ó ......

My sqlÖÐÎÄÂÒÂëÎÊÌ⣡

      Õ⼸ÌìÒ»Ö±±»ÖÐÎÄÂÒÂëÎÊÌâÀ§ÈÅ£¬ÖÐÎÄÊý¾Ý²åÈëµ½My SqlÖкÜÕý³££¬ÔÚCommand client lineÖÐÒ²ÄÜÕý³£ÏÔʾ£¬¿É´ÓÊý¾Ý¿âÖжÁµ½JSPÒ³ÃæÉÏʱ£¬¾Í±ä³É“»ðÐÇÎÄ”ÁË¡£
¡¡¡¡ÓÚÊÇÉÏÍø²éѯ£¬Ò²¿´µ½ºÃ¶à·½·¨£ºÓеÄ˵°Ñmy.iniÖÐdefault-character-set=latin1¸ÄΪdefault-character-set=utf8,ÓÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ