Çë½Ì¸÷λSQL´ïÈË - MS-SQL Server / ÒÉÄÑÎÊÌâ
ÏÖÔÚÎÒÓÐÒ»¸öEXL±í¸ñ£¬ÐÅÏ¢ÈçÏÂ
Ê¡ ÊÐ Çø ·Ç·þÎñÇøÓò ¹«Ë¾
½ËÕÊ¡ Õò½ÊÐ µ¤Ñô AÕò B¹«Ë¾
½ËÕÊ¡ Õò½ÊÐ ¾©¿Ú BÕò B¹«Ë¾
»¹ÓкܶàÕâÑù¸ñʽµÄÐÅÏ¢¡£¡£¡£²»Ò»Ò»ÁоÙÁË
ÈçºÎ°ÑÕâЩÐÅÏ¢¶¼µ¼ÈëSQLÊý¾Ý¿âÖеıíÄÚÄØ£¿ Èç¹ûÒ»¸ö¸öµÄÊÖ¶¯Ð´£¬ÒªÀÛËÀÈ˵ģ¬Êý¾ÝÆðÂëÉÏÍòÌõ¡£Çó½â´ð£¬Ð»Ð»£¡
ÔÚSQL¹ÜÀíÆ÷Àï,ÓиöÊý¾Ýµ¼Èëµ¼³ö¹¦ÄÜ,ÄãÔÚÄÇÀï°ÑÊý¾Ýµ¼Èë½øÈ¥¾ÍºÃÁË!
¿ÉÒÔÖ±½Óµ¼ÈëµÄ£¬Í¼Ðλ¯µÄ½çÃæ
Êý¾ÝÔ´Ñ¡Ôñ¶ÔÁ˾ͿÉÒÔÁË
µ¹²»ºÃ£¬Ö´ÐеÄʱºòÓдí·
Assuming you are running:
SQL2K5 (non-express edition) - In SSMS, right click the database you want to import the data into -> tasks -> import data and then simply follow the prompt
SQL2K5 Express - assuming you have Access. Create an access ADP project pointing to the database you want to import the data into. Create a table to store the data from Excel. Copy from Excel and Paste via ADP into the table. If you don't have Access - well, you can write insert statement for each row and using formulae to generate all the SQL statements. Then simply copy and paste the SQL into Management Studio to execute the insert batch.
SQL2K - in SSEM, right click on the database you want to import data into->tables -> all tasks -> import data and then follow the prompt.
ÄÜ·ñ°Ñ´íµÄÌáʾ»Ãæ½Ø³öÀ´?
˵ÎÒEXL±í¸ñÓÐ´í¡£µ¼ÈëµÄʱºò select * from ±íÃû £¨±íÃûÊÇÂÒ
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......
ÏÖÔÚÓÐÁ½ÕÅ±í£ºÎÄÕÂÖ÷±íA(articleId,articleTitle)£¬ÎÄÕÂÆÀÂÛ±íB(commentId,articleId,commentTitle)
ÏÖÔÚÎÒÏëʵÏÖÕâÑùµÄ¹¦ÄÜ£ºÁгöÎÄÕÂÁÐ±í£¬ÆäÖÐÿƪÎÄÕ±êÌâÏÂÃæÁгö´ËÎÄÕµÄǰ2¸öÎÄÕÂÆÀÂÛ£¬ÇëÎÊsqlÓï¾äÔõôд°¡ ......
ÏÂÃæÊÇXML³õʼÎļþÄÚÈÝ
XML code:
<upd:Update xmlns:lar="http://schemas.microsoft.com/msus/2002/12/LogicalApplicabilityRules" xmlns:cmd="http://schemas.microsoft.com/msus/2002/12/Up ......