sql serverÖеĴ洢¹ý³Ìµ÷ÊÔ
µ÷ÊÔ:
ÔÚSQL QUERYÖЗ¡·¶ÔÏóä¯ÀÀÆ÷—¡·´æ´¢¹ý³Ì—¡·Ñ¡ÔñÒªµ÷ÊԵĴ洢¹ý³Ì—¡·ÓÒ»÷—¡·Ñ¡Ôñµ÷ÊÔ£¨debug£©—¡·ÊäÈë²ÎÊý—¡·--ÉèÖÃÍêÄãµÄ²ÎÊýÖµºó--µã»÷Ö´ÐУ¬¾ÍÊdzöÏÖÒ»¸ö¸¡¶¯¹¤¾ßÌõ£¬ÉÏÃæÓе¥²½Ö´ÐУ¬¶ÏµãÉèÖõÈ
---¸ú×Ù :
¿ªÊ¼->³ÌÐò->MS SQLSERVER->ʼþ̽²éÆ÷(SQL Profiler)-->Îļþ-->н¨-->¸ú×پͿÉÒÔÁË¡£¡£È»ºóÊý¾Ý¿âµÄµ÷ÓÃÇé¿ö¾Í»áÏÔʾ³öÀ´
FAQ:
·þÎñÆ÷: ÏûÏ¢ 514£¬¼¶±ð 16£¬×´Ì¬ 1£¬¹ý³Ì sp_sdidebug£¬ÐÐ 1
[Microsoft][ODBC SQL Server Driver][SQL Server]ÎÞ·¨Óë GISWORLD\GISQLAND Éϵĵ÷ÊÔ³ÌÐòÁªÂ磨´íÎó = 0x80070005£©¡£ÒѽûÓöÔÁ¬½Ó 54 µÄµ÷ÊÔ¡£
ͻȻÏëÆðÓÓ±¾µØϵͳÕÊ»§”µÇ½£¬¶øSQL Server×÷Ϊ·þÎñÔËÐУ¬²»Äܵ÷ÊÔ´æ´¢¹ý³Ì£¬Æä½â¾ö·½·¨ÈçÏ£º
¿ØÖÆÃæ°å—>¹ÜÀí¹¤¾ß—>·þÎñ—>MSSQL£¨Ä¬ÈϵÄID£©—>ÊôÐÔ—>µÇ½—>Ñ¡Ò»¸öWindowsÕÊ»§£¬ÌîдÃÜÂ룬ÔÙÖØÐÂÆô¶¯SQL Server 2000¾Í¿ÉÒÔµ÷ÊÔ´æ´¢¹ý³ÌÁË¡£
Ïà¹ØÎĵµ£º
1 £¬¶ÔÓÚÈÕÆÚ×Ö¶Î×Ö¶Î
access±íʾΪ£º#1981-28-12#
SQLSERVER2000±íʾΪ£º''1981-02-12''
2,SQLÓï¾äÇø±ð£¬select ,update ÔÚ¶Ôµ¥±í²Ù×÷ʱ¶¼²î²»¶à£¬
µ«¶à±í²Ù×÷ʱupdateÓï¾äµÄÇø±ðACCESSÓëSQLSERVERÖеÄUpdateÓï¾ä¶Ô±È:
SQLSERVERÖиüжà±íµÄUpdateÓï¾ä:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Whe ......
ת×Ô£ºÃ÷Ò¹ÐÇ¿Õ -- Insert select ´øÑ¡Ôñ¸´ÖÆÒ»ÕÅ±íµ½ÁíÒ»Õűí
ʹÓÃSELECT INTO ºÍ INSERT INTO SELECT ±í¸´ÖÆÓï¾äÁË¡£
1.INSERT INTO SELECTÓï¾ä
Óï¾äÐÎʽΪ£ºInsert into Table2(field1,field2,...) select value1,value2,... from Table1 [where column =value]
[]Ϊ¿ÉÑ¡ÄÚÈÝ
ÒªÇóÄ¿±ê±íTable2±ØÐë´æÔÚ£¬ÓÉÓ ......
8. bulk collect /forall
ʹÓÃbulk collect¿ÉÒԳɿéµØ¶ÁÈ¡Êý¾Ý£¬Ëü¿ÉʹSQLÒýÇæÔÚ·µ»ØÊä³ö½á¹û¸øPL/SQLÒýÇæ֮ǰ´óÅú°ó¶¨Êä³ö¼¯ºÏ¡£ÕâÑù¿ÉÒÔÒ»´ÎÐԵذÑÊý¾Ý¶¯Ì¬µØ×°Ôص½¼¯ºÏÖУ¬µ«bulk collectÐèÒª´óÁ¿ÄÚ´æ¡£bulk collect¿ÉÓÃÓÚselect into¡¢fetch intoºÍreturning intoÓï¾äÖС£
¡ñ se ......
ASPµ÷Óô洢¹ý³ÌµÄ·½·¨£º
---- ¡¡¡¡µ÷Óô洢¹ý³ÌµÄ·½·¨ÐèҪʹÓÃADOµÄCommand¶ÔÏó¡£Command¶ÔÏóÊǶÔÒ»¸öÊý¾ÝÔ´ÔËÐÐÌض¨ÃüÁîµÄ¶¨Ò壨ÀýÈ磬һ¸öSQL²éѯ»òÒ»¸öSQL´æ´¢¹ý³Ì£©¡£ÏÂÃæÒÔMS SQL SERVER6.5Ϊºǫ́Êý¾Ý¿â£¬½éÉÜASPµ÷Óô洢¹ý³ÌµÄ·½·¨¡£
---- ¡ ......
<%
SQL1 = "update table1 set a=b where id=1"
Conn.ExeCute SQL1
SQL2 = "update table2 set a=b where id=2"
Conn.ExeCute SQL2
SQL3 = "update table3 set a=b where id=3"
Conn.ExeCute SQL3
%>
&nb ......