Çó sql Óï¾ä
Óбía ½á¹¹ÈçÏÂ
pid pnum sid
1 10 01
1 12 02
2 8 01
3 11 01
3 8 03
ÆäÖÐ pid Ϊ²úÆ·±àºÅ pnumΪ²úÆ·ÊýÁ¿ sidΪ²Ö¿âid ÇëÓñàдsql Óï¾ä ʵÏÖ½«ÉϱíÖеÄÊý¾ÝºÏ²¢
pid s1id s2id s3id
1 10 12 0
2 8 0 0
3 11 0 8
s1id Ϊ²Ö¿â01 µÄ¿â´æÁ¿
s2id Ϊ²Ö¿â02 µÄ¿â´æÁ¿
s3id Ϊ²Ö¿â03 µÄ¿â´æÁ¿
Èç¹û¸Ã²úÆ·ÔÚij²Ö¿âÖÐÎÞ¿â´æÁ¿ ÓÃ0´úÌæ
¶¥
ºÇºÇ£¬¼ÓÁË10·Öà¸
ûÓÐÈË»áÂð
SQL code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.c
Ïà¹ØÎÊ´ð£º
ÎÒÊý¾Ý¿âÊÇMSSQLµÄ£¬×òÌìËùÓÐµÄ±í±»×¢ÈëJS½Å±¾´úÂë,Óиö²»Ã÷°×µÄµØ·½À´ÎÊÎÊ´ó¼Ò
ÎÒ·¢ÏÖÓÐЩ±íÎÒ¸ù±¾Ã»Ê¹Óã¬Ò²Ã»ÓÐÈë¿âµÄASPÒ³ÃæºÍÓï¾ä£¬ËüÊÇÔÛ¸ö×¢ÈëµÄÄØ£¿
Ã²ËÆselectÓï¾äÊÇ¿ÉÒÔǶÌ׵İɣ¿
¿ÉÄÜÊÇwhere ......
ÒÑÖª´ÓB,±íÖÐÕÒ³öID, NAMEÁ½ÏîÓëC±íÏàͬµÄÊý¾Ý£¬ÔÙÒÀ¾ÝB±íÖо¹ý²éѯ³öÀ´µÄID,CODEÁ½ÏîÊý¾Ý²éѯÓëA±íID,CODEÁ½ÏîÏàͬµÄÊý¾ÝÖжÔÓ¦µÄEMAILÀ´£¬²¢ÁгöÈçÏÂD±íµÄÐÎʽ£¬²»ÖªÎÒÊÇ·ñ±íʾÇå³þ£¿Âé·³°ïÎÒÁÐһϹ«Ê½ºÃÂð£¿Íò· ......
sql¿ÉÒÔÓÐÁ½¸öÒÔÉϵĴ¥·¢Æ÷Â𣿣¿ÎÒÖ¸µÄÊÇfor´¥·¢Æ÷£¬ÄÇÆäËûµÄÄØ£¿£¿
ʲôÒâ˼£¿
¿ÉÒÔµÄ
10¸ö¶¼Ã»ÎÊÌâ
¿ÉÊÇÎÒдÁËÁ½¸öfor insert ´¥·¢Æ÷£¬Ôì³É½ø³Ì×èÈûÁËÄØ£¿Ôõô°ìÄØ£¿Çë¸ßÈËÖ¸µã
......
ÇëÎÊ£º
1,ÈçºÎ½«Ò»ÕÅdbf±íµ¼Èëµ½sql server2000ÖеÄÒ»ÕÅ±í¡£Ê¹ÓÃDTS¸ÃÔõÑùʵÏÖ£¿
2,ʹÓÃÍøÉÏ´úÂ룺
Insert Into Tb_cj Select * from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro D ......
±íÈçÏÂ
½ÌÊÒID ×ùλÊý ¿ªÊ¼Ê±¼ä ½áÊøÊ±¼ä 2009Äê1ÔÂ1ÈÕ 2009Äê1ÔÂ2ÈÕ 2009Äê1ÔÂ3ÈÕ
101 50 08£º00 08£º30 30 40 50
101 50 09£º00 ......