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

excelÊý¾Ýµ¼ÈëSQLSERVERÎÊÌâ

ÎÒÓà insert into  table  select *  from  '+
        'OpenDataSource(''Microsoft.Jet.OLEDB.4.0'',''Data Source="'+opendialog1.FileName+'";User ID=;Password=;Extended Properties=Excel 8.0;Persist Security Info=False'')...sheet1$' ;
ʵÏÖexcelµÄÊý¾Ýµ¼Èëµ½SQL SERVERÀÓÐÒ»µã¸ã²»Ã÷°×£¬¾ÍÊÇ˵EXCELÀïÃæµÄ±íµÄ×ֶκÍSQL SERVERÀïÃæ±ítableµÄ×ֶαØÐëÒ»Ñù²ÅÄܵ¼ÈëÂð£¿Äܲ»ÄÜÔÚSQL SERVERÀïн¨Ò»¸ö±íµ¼È룬¾ßÌåµÄÓï¾äÔõÑùʵÏÖµÄÄØ£¬¸ÕѧdelphiºÜ¶àÎÊÌⶼ²»¶®¡£Ð»Ð»¸÷λ´óϺÁË
ÏòÄãÕâÖÖд·¨£¬×ֶξͱØÐëµÃÒ»Ò»¶ÔÓ¦£¬Èç¹ûÓÖ²»Ò»ÑùµÄ×ֶΣ¬Äã¾ÍÒªÖ¸Ã÷×Ö¶ÎÃû£¬±ÈÈç
insert into A(a,b,c) select d,e,f from B

LZµÄÎÊÌâ²»ÊÇDelphiÎÊÌ⣬ÊÇSQL²»ÊìÁ·


ÊÇ

ÒýÓÃ
Èç¹ûÏë°Ñsheet1È«µ¼Èëµ½Êý¾Ý¿â£¬´ó¿É½«Ç°ÃæµÄinsert into  table  select *  from ¸Ä³Éselect * into  table from ÕâÑù¾Í²»ÓÃÌáÇ°½¨ºÃtable±í£¬¶øÊÇÔÚÖ´ÐÐʱ×Ô¶¯¾ÍÉú³ÉÁË£¬sheet1µÄµÚÒ»ÐоÍÊÇtable±íµÄÁÐÃû£¬sheet1ÓжàÉÙÁУ¬table±í¾ÍÉú³É¶àÉÙÁС£



Ïà¹ØÎÊ´ð£º

¹ØÓÚSQLSERVERµ×²ãÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÇëÎÊһϣ¬ÍâÍøÁ½Ì¨SQLSERVERʵÀýÊý¾Ý´«Ê䣬ÓÐûÓвÉÓÃÊý¾ÝѹËõºÍ¼ÓÃÜ¡£Ñ¹Ëõ±ÈÊǶàÉÙ£¬¼ÓÃÜÊÇʲô¼ÓÃÜËã·¨£¿Ïà¹ØÎĵµÄÄÀï¿ÉÒÔÕÒµ½£¿Ð»Ð»


ÎÒÒ²ÏëÖªµÀ£¡¹Ø×¢´ËÌù£¡

¹Ø×¢¡«¡«

Êý¾Ý¿â´óÅ£¶¼ÄÄÈ¥ÁË°¡£¿
......

java³ÌÐòÁ¬½ÓSQlServerµÄÎÊÌâ - Java / Java SE

import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class QueryTest&n ......

³õѧÕß¡£Sqlserver nullµÄÎÊÌâ

´ÓÍøÉϲ鵽µÄ×ÊÁÏ˵£¬ÈκÎÊý¾ÝÀàÐÍÓëNULLÖµ½øÐмÆË㣬½á¹û¶¼½«ÎªNULL.
select null-1
½á¹ûÊÇnull
¿ÉÊÇÏÂÃæÕâ¸ö²éѯΪʲô»á³ö´íÄØ£¿
select isnull(null-1,'test');
¾ÓÈ»±¨´í˵½«varcharתΪintʧ°Ü¡£
Ϊʲô» ......

asp.net²éѯSqlServerÖÐtextÀàÐÍÊý¾Ý¶ªÊ§

asp.net²éѯSqlServer2005ÖÐtextÀàÐÍÊý¾Ý³£³£¶ªÊ§£¬Ìí¼ÓÊý¾Ýµ½textÀàÐÍÖп´Ò³ÃæÉÏ¿ÉÒÔ£¬ÓиöÒ»Á½Ì죬¾Í¿ÉÄÜ»á³öÏÖtext
Êý¾Ý´æµÄÊý¾ÝȱÉÙÒ»²¿·Ö£¬ÎªÊ²Ã´°¡£¡Çë´ó¼Ò°ï°ïæ°¡£¡
Óöþ½øÖÆ´æ·ÅËãÁË

²»Ã÷°×£¬ÄÜ×Ðϸ ......

Çó½Ì·þÎñÆ÷É쵀 sqlserverÊý¾Ý¿âµÄ±¸·ÝºÍ»¹Ô­

¼ÙÉèÎÒµÄÊý¾Ý¿âÊÇ·ÅÔÚµçÄÔAÀ¶øÍøÕ¾·ÅÔÚµçÄÔBÀÄÇÎÒÏÖÔÚÒªÊÇÏ뱸·ÝµçÄÔAÉϵÄÊý¾Ý¿âµ½µçÄÔBµÄ´ÅÅÌÀÎÒ¸ÃÔõô×ö£¿Ï£Íû´ó¼Ò¸ø°ï°ï棬×îºÃÄܸø¸ödemo¡£ÎÒÓÊÏäÕ˺ţº952378159@qq.com ÏÈлл¸÷λÁË°¡£¡
ÓкܶàÖÖ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ