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

SQL XML DELETE

--A. ´Ó´æ´¢ÔÚ·ÇÀàÐÍ»¯µÄ xml ±äÁ¿ÖеÄÎĵµÖÐɾ³ý½Úµã
DECLARE @myDoc xml
SET @myDoc = '<?Instructions for=TheWC.exe ?>
<Root>
 <!-- instructions for the 1st work center -->
<Location LocationID="10" LaborHours="1.1" MachineHours=".2" >
 Some text 1
 <step>Manufacturing step 1 at this work center</step>
 <step>Manufacturing step 2 at this work center</step>
</Location>
</Root>'
SELECT @myDoc
-- delete an attribute
SET @myDoc.modify('
  delete /Root/Location/@MachineHours
')
SELECT @myDoc
-- delete an element
SET @myDoc.modify('
  delete /Root/Location/step[2]
')
SELECT @myDoc
-- delete text node (in <Location>
SET @myDoc.modify('
  delete /Root/Location/text()
')
SELECT @myDoc
-- delete all processing instructions
SET @myDoc.modify('
  delete //processing-instruction()
')
SELECT @myDoc
--B. ´Ó´æ´¢ÔÚ·ÇÀàÐÍ»¯µÄ xml ÁÐÖеÄÎĵµÖÐɾ³ý½Úµã
delete XML DML Óï¾ä´Ó´æ´¢ÔÚÁÐÖеÄÎĵµÖÐɾ³ý <Features> µÄµÚ¶þ¸ö×ÓÔªËØ¡£
CREATE TABLE #T (i int, x xml)
go
INSERT INTO #T VALUES(1,'<Root>
<ProductDescription ProductID="1" ProductName="Road Bike">
 <Features>
   <Warranty>1 year parts and labor</Warranty>
   <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
 </Features>
</ProductDescription>
</Root>')
go
-- verify the contents before delete£¬query·µ»ØFeaturesÔªËØÏµÄËùÓнڵã,ÒÔXML¸ñʽ·µ»Ø
SELECT x.query('//ProductDescription/Features')
from #T
-- delete the second feature
UPDATE #T
SET x.modify('delete /Root/ProductDescription/Features/*[2]')
-- verify the deletion
SELECT x.query(' //ProductDescription/Features')
from #T
DROP TABLE #T
C. ´Ó·ÇÀàÐÍ»¯µÄ xml ÁÐÖÐɾ³ý½Úµã
create table #T(ProductModelID int primary key,
Instructions xml )
go
insert  #T
select ProductModelID, Instructions
from Prod


Ïà¹ØÎĵµ£º

js ½âÎö xml ÊôÐÔ

function init() {
 var viewChartID = 0;
 var viewChartSum = "" ;
 reportName = document.getElementById("reportName").value;
 xmlDoc=loadXMLDoc("./charreport/xml/viewChart.xml");
 x=xmlDoc.getElementsByTagName('viewChart')[0].childNodes;
 for (i=0;i<x.length;i++ ......

SQL ServerÐÔÄÜÓÅ»¯µÄһЩ¼¼ÇÉ


Êý¾Ý¿âÐÔÄÜÓÅ»¯Éæ¼°µ½ºÜ¶à·½Ã棬ÔÚÊý¾Ý¿â¿ª·¢Ê±¿ÉÒÔͨ¹ýһЩ»ù±¾µÄÓÅ»¯¼¼ÇÉÌá¸ßÊý¾Ý¿âµÄÐÔÄÜ£º
1£®Ô­ÔòÉÏΪ´´½¨µÄÿ¸ö±í¶¼½¨Á¢Ò»¸öÖ÷¼ü,Ö÷¼üΨһ±êʶijһÐмǼ£¬ÓÃÓÚÇ¿ÖÆ±íµÄʵÌåÍêÕûÐÔ¡£SQL Server 2005 Database Engine ½«Í¨¹ýΪÖ÷¼üÁд´½¨Î¨Ò»Ë÷ÒýÀ´Ç¿ÖÆÊý¾ÝµÄΨһÐÔ¡£²éѯÖÐʹÓÃÖ÷¼üʱ£¬´ËË÷Òý»¹¿ÉÓÃÀ´¶ÔÊý¾Ý½øÐпì ......

XML Schema£¨Ó¦ÓÃÉè¼Æ£©

     XML SchemaÖ÷ÒªÓÃÀ´Éè¼ÆXMLÎĵµµÄ½á¹¹£¬×¢Òâ²»ÊǸñʽ¡£ÓÐÈËÎÊÔõô²»ÊǸñʽ£¿¸ñʽ¸ú½á¹¹Ê²Ã´Çø±ð£¿ÎÒÏë¸ã¿ª·¢µÄÈ˶¼¶Ô´úÂë½øÐиñʽ»¯¹ý£¬Ò²¾ÍÊÇËõ½ø¡¢×ÖÌåµÈµÈ£»¶øÎÒÃÇдµÄ³ÌÐòʵ¼ÊÉÏÒ²ÊǶ¨ÒåÒ»Öֽṹ£¬Ëü²»»áÒòΪÄãÊÇ·ñËõ½ø¡¢²ÉÓò»Í¬µÄ×ÖÌå¾ÍÓÐËù¸Ä±ä°É£¿ºÜ¶àÈËÄÄÁ˲»·ÖÐеÄxmlÎĵµËµÓÃVSµÄ¹¤¾ß¸ ......

sql serverÎÞ·¨Á¬½Ó issue

http://blog.csdn.net/java2000_net/archive/2008/04/05/2252640.aspx
http://sqlserver.chinahtml.com/2006/SQL-mssql11432786154012.shtml
http://www.cnblogs.com/garnai/archive/2007/09/19/898221.html
http://tech.ccidnet.com/art/1099/20050223/214511_1.html
http://www.wangchao.net.cn/bbsdetail_43009.html ......

MyEclipse5.5ÏÂÁ¬½ÓSql Server 2008µÄ·½·¨

ÏÂÃæÊÇÖ¸µ¼Îĵµ¡£Çë¸ú×ÅÒ»²½²½µÄ×ö¡£¾ÍÄܳɹ¦Á¬½ÓÉÏsql server 2008
 
javaÖÐÁ¬½Ósql server 2008µÄ×¢ÒâÊÂÏ
2000£¬2005µÄÊý¾Ý¿âÇý¶¯ÀàµÄд·¨ÊÇ£º
com.microsoft.jdbc.sqlserver.SQLServerDriver
URLµÄд·¨ÊÇ£º¼ÙÉèÊý¾Ý¿âÊÇnews
jdbc:microsoft:sqlserver://localhost:1433;databaseName=news
 
µ«ÊÇ20 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ