SQL 2005 ¶Ôxml ÎļþÓë xmlÊý¾ÝµÄ²Ù×÷
ÓÉÓÚÊý¾Ý¿â¶ÔxmlÊý¾ÝÖ±½Ó´¦ÀíÓкܶàÓÅÊÆ£¬05Ò²¶ÔÕâ·½Ãæ¼ÓÇ¿Á˹¦ÄÜ¡£
µ«Õâ·½Ãæ×ÊÁÏÉÙ£¬ËùÒÔ×Ô¼º×öÁËһЩ×ܽᣬϣÍû»á¸ø´ó¼Ò´øÀ´°ïÖú
--charry0110(Ïþ·ç²ÐÔÂ)
--×÷Õߣº³Âº£Óê
--ÓÃSQL¶àÌõ¿ÉÒÔ½«¶àÌõÊý¾Ý×é³ÉÒ»¿ÃXMLÊ÷LÒ»´Î²åÈë
--½«XMLÊ÷×÷Ϊvarchar²ÎÊý´«ÈëÓÃ
--insert xx select xxx from openxml() µÄÓï·¨²åÈëÊý¾Ý
-----------------------------------µ¼È룬µ¼³öxml--------------------------
--1µ¼ÈëʵÀý
--µ¥¸ö±í
create table Xmltable(Name nvarchar(20),Nowtime nvarchar(20))
declare @s as nvarchar(2000);
set @s = N''
<Xmltables>
<Xmltable Name="1" Nowtime="1900-1-1">0</Xmltable>
<Xmltable Name="2" Nowtime="1900-1-1">0</Xmltable>
<Xmltable Name="3" Nowtime="1900-1-1">0</Xmltable>
<Xmltable Name="4" Nowtime="1900-1-1">0</Xmltable>
<Xmltable Name="5" Nowtime="1900-1-1">0</Xmltable>
</Xmltables>'';
declare @idHandle as int ;
EXEC sp_xml_preparedocument @idHandle OUTPUT, @s
insert into Xmltable(Name,Nowtime)
select * from openxml(@idHandle,N''/Xmltables/Xmltable'')
with dbo.xmltable
EXEC sp_xml_removedocument @idHandle
select * from Xmltable
-----------------------¶ÁÈëµÚ¶þ¸ö±íÊý¾Ý--------------------
create table Xmlta(Name nvarchar(20),Nowtime nvarchar(20))
declare @s as nvarchar(4000);
set @s =N''
<Xmltables>
<Xmltb Name="6" Nowtime="1900-2-1">0</Xmltable>
<Xmlta Name="11" Nowtime="1900-2-1">0</Xmlta>
</Xmltables>
Ïà¹ØÎĵµ£º
Microsoft SQL Server ±í²»Ó¦¸Ã°üº¬Öظ´ÐкͷÇΨһÖ÷¼ü¡£Îª¼ò½àÆð¼û£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÓÐʱ³ÆÖ÷¼üΪ“¼ü”»ò“PK”£¬µ«ÕâʼÖÕ±íʾ“Ö÷¼ü”¡£Öظ´µÄ PK Î¥·´ÁËʵÌåÍêÕûÐÔ£¬ÔÚ¹ØϵϵͳÖÐÊDz»ÔÊÐíµÄ¡£SQL Server Óи÷ÖÖÇ¿ÖÆÖ´ÐÐʵÌåÍêÕûÐԵĻúÖÆ£¬°üÀ¨Ë÷Òý¡¢Î¨Ò»Ô¼Êø¡¢Ö÷¼üÔ¼Êøº ......
[¿ÉÓÃ]Èç¹û³öÏÖ°²×°sql server 2000ÒªÇóCD-KEYµÄÇé¿ö,ÇëʹÓÃregedt32ÕÒ¿ª×¢²á±í,ÔÚÒÔÏÂÖ÷¼ü[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]Öн¨Á¢Ò»¸öDWORD¼ü
SafeDLLSearchMode²¢ÉèֵΪ0
Õâ¸öÊÔ¹ý£¬ÊÇ¿ÉÒÔÓõÄ
H6TWQ-TQQM8-HXJYG-D69F7-R84VM - ......
×÷Õß Haidong Ji ·Òë GoodKid
ÎÒÃǵ±ÖеĴ󲿷ÖÈ˹¤×÷ÔÚÒ»¸öµ¥Ò»µÄ RDBMS ϵͳÖУ¬Èç MSSQL, Oracle, or IBM DB2¡£È»¶ø£¬ÎÒÃÇÈÕÒæ¸Ð¾õµ½£¬ÎÒÃÇÕý´¦ÓÚ²»Í¬µÄÊý¾Ý¿â»·¾³µ±Öв¢ÇÒÐèÒª½â¾öÊý¾ÝµÄ»¥ÓÃÐÔÎÊÌâ¡£
¾¡¹ÜÖ÷ÒªµÄ RDBMS ³§ÉÌÊÔͼȥ×ñѹØϵÊý¾Ý¿âÄ£ÐÍÔÀí£¬²¢ÇÒÓ÷dz£Ð¡µÄ²îÒìȥʵÏÖËüÃÇ¡£ÁíÍ⣬¼¸ºõÖ÷ÒªµÄ ......
8.2 ¾ÛºÏº¯ÊýµÄÓ¦ÓÃ
¾ÛºÏº¯ÊýÔÚÊý¾Ý¿âÊý¾ÝµÄ²éѯ·ÖÎöÖУ¬Ó¦ÓÃÊ®·Ö¹ã·º¡£±¾½Ú½«·Ö±ð¶Ô¸÷¾ÛºÏº¯ÊýµÄÓ¦ÓýøÐÐ˵Ã÷¡£
8.2.1 ÇóºÍº¯Êý——SUM()
ÇóºÍº¯ÊýSUM( )ÓÃÓÚ¶ÔÊý¾ÝÇóºÍ£¬·µ»ØÑ¡È¡½á¹û¼¯ÖÐËùÓÐÖµµÄ×ܺ͡£Óï·¨ÈçÏ¡£
SELECT SUM(column_name) ......
ÔÚÈí¼þ¿ª·¢ÖУ¬³£³£ÐèҪΪ³ÌÐò½¨Á¢Sql ServerÊý¾Ý¿âµÄÔËÐл·¾³¡£Íê³ÉÈçÔÚSQL ServerÊý¾Ý¿âÖн¨Á¢É豸£¬½¨Á¢Êý¾Ý¿â£¬½¨Á¢±í¸ñ£¬·ÖÅäȨÏ޵ȹ¦ÄÜ£¬ÈçºÎ·½±ãµÄ½¨Á¢Ó¦ÓóÌÐòËùÐèSql Server»·¾³µÄÊý¾Ý¿â»·¾³£¬¶ø²»ÓÃÆô¶¯SQL Enterprise ManagerÄØ£¿
ÏÂÃæÀ´¿´£º
¡¡¡¡Æô¶¯VB6.0£¬Ð½¨Ò»¸ö¹¤ ......