Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query with XML help
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01497674
Message ID:
01497698
Views:
43
Another option
DECLARE @xml xml
SET @xml = '<pbXML>
   <Shipment>
       <BillNr>9999</BillNr>
       <ConsigneeId>123456</ConsigneeId>
   </Shipment>
</pbXML>'

SELECT @xml.query('/pbXML/Shipment/BillNr/text()')
>The following returned what I needed:
>
>
>CAST(XMLInString as XML).value('(/pbXML/Shipment/BillNr)[1]', 'varchar(10)')
>
>
>Thanks again for your help,
>Daniel
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform