sqlxml - Xquery syntax error in SQL server 2012 -
i want return character 'o' in sql database while working xml data wrote following query:
use master select song_type.query ('table/[where o.name % o %]') xmldata
but program returned error saying:
msg 9341, level 16, state 1, line 2
xquery [xmldata.song_type.query()]: syntax error near '[', expected step expression.
please how fix this.
try ...
select * xmldata cast(convert(varchar(max),song_type) xml).value("o.name[0]","varchar(500)") '% o %'
Comments
Post a Comment