How can i read 117(LockboxID) value from below XML in sql server. Please help me
'
An exception was generated for LockBoxID=117.
Amount = 575.3600
Total = 276.2500
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanjeeb LenkaPosted Jul 3, 2013, 9:04 AM
create table #temp (xml_data xml)
insert into #temp values
('
select xml_data.value('(/commdef/field/.)[4]', 'varchar(10)') as [LockboxID] from #temp
any problem reply
if its help you mark it as answered
Ajitender VijayPosted Jul 3, 2013, 8:51 AM
Sanjeeb LenkaPosted Jul 3, 2013, 8:46 AM
select xml_data.value('(/commdef/LockboxID/.)[1]', 'varchar(10)') as [LockboxID] from tabelname
or for any help check this link
http://stackoverflow.com/questions/15846990/extracting-attributes-from-xml-fields-in-sql-server-2008-table
Ajitender VijayPosted Jul 3, 2013, 8:30 AM
Iftikar HussainPosted Jul 3, 2013, 8:25 AM
Please provide more details. Are you trying to read the XML value in ASP.NET or SQL?
Regards,
Iftikar