Skip to content

Commit ed97ee9

Browse files
Create XMLHandling
1 parent 88e8ee7 commit ed97ee9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

XMLHandling

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
I have a xml inside a nvarchar(max) column below is the sample
2+
<Create Id="1234" No="3333" workId="456" Name="testxml" Description="" />
3+
how to get the workId
4+
5+
Ans:-
6+
SELECT (CAST ([xmlColumnName] AS xml)).value('(/Create/@workId)[1]', 'int') AS workId
7+
FROM tablname t

0 commit comments

Comments
 (0)