|
|
|
Click here to copy the following block | DECLARE @h int EXEC sp_xml_preparedocument @h OUTPUT,N' <?xml version="1.0" ?> <Orders> <Item> <CID>1</CID> <ModelNumber>HO1255</ModelNumber> <Features> <AutoStart>Yes</AutoStart> <AutoGear>No</AutoGear> <PowerWindow>Yes</PowerWindow> </Features> <Description/> <Make>Honda Accord LX</Make> <ModelYear>2001</ModelYear> </Item> <Item> <CID>2</CID> <ModelNumber>FO7855</ModelNumber> <Features> <AutoStart>No</AutoStart> <AutoGear>No</AutoGear> <PowerWindow>No</PowerWindow> </Features> <Make>Ford Winstar</Make> <ModelYear>1998</ModelYear> </Item> <Item> <CID>3</CID> <ModelNumber>TO8989</ModelNumber> <Make>Toyota Camry</Make> <ModelYear>1990</ModelYear> </Item> </Orders>'
SELECT CID,ModelNumber,Make,ModelYear, Features FROM OpenXML(@h,'/Orders/Item/Features', 2) WITH (CID INT '../CID', ModelNumber varchar(100) '../ModelNumber', Make varchar(100) '../Make', ModelYear varchar(100) '../ModelYear', Features ntext '@mp:xmltext') WHERE Features IS NOT NULL
|
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|