SQL iteration for XML

I am trying to read an xml data field from a table and insert this data into another database. The XML document looks like this:



1
2
3
4

My idea is to get 1 id and insert it to get another And insert, and so on. I try to use xquery, but the best I can get is all the data, but I need to insert id separated:/

Does it help? d:

declare @xml xml ='

1
2
3
4< br />

'insert into YourTable(ID)select TNvalue('.','int')from @xml.nodes('/Master/UserIds/id') as T(N)

I am trying to read an xml data field from a table and insert this data into another database. The XML document looks like this:

< /p>



1
2
3
4

My idea is to get 1 One id and insert, get another and insert, and so on. I try to use xquery, but the best I can get is all the data, but I need to insert id separation:/

Does it help? ? d:

declare @xml xml ='

1
2
3
4

< /Master>'insert into YourTable(ID)select TNvalue('.','int')from @xml.nodes('/Master/UserIds/id') as T(N)

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 6054 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.