今天第一次尝试用xpath去搜索xml字符串,把自己写的sql帖在下面,以后参考

 

1 WITH XMLNAMESPACES (
2    'http://www.gamingstandards.com/s2s/schemas/v1.2.6/' AS s2s,
3    'http://s2s.igt.com/player-ext1/v1.0.0' as p1)
4 select cast(body as xml).value('(/s2s:s2sMessage/s2s:s2sBody/s2s:player/s2s:playerInfo/@p1:playerId)[1]','varchar(50)'from dbo.s2sOutBound_Complete 
5 where cast(body as xml).exist('/s2s:s2sMessage/s2s:s2sBody/s2s:player/s2s:playerInfo'=1 

 

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2021-10-12
  • 2021-06-23
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案