I have an XML document similar to below with multiple links stored in a SQLServer database
<Pop_Up>
<Link1_Url />
<Link2_Url />
<Link3_Url>Some URL</Link3_Url>
</Pop_Up>
I'm trying to extract all the Links using:
select t.Data_xml.value('(/Pop_Up/Link*_Url)[1]','varchar(500)') as link
from TableName t
But it seems like the wildcard *
is not allowed. Are there any alternative ways I can do this?