Last post Oct 23, 2016 04:34 AM by avt2k7
Oct 22, 2016 10:17 PM|avt2k7|LINK
I got a sample Books.xml as following:
<title>XML Developer's Guide</title>
I like to write a stored procedure that take XML file as string to update the records in a SQL server named tblBook with columns (author, title, price, sold_date). The rules for update existed or insert new record based on combined fields author and title.
If a table has records which same author and title with XML string, then just update new price and sold_date data; otherwise it inserts new records into tblBook.
Please help with specified T-SQL query for sproc. Thanks in advance.
Oct 23, 2016 04:34 AM|avt2k7|LINK
Found the solution at http://stackoverflow.com/questions/24167421/sql-server-update-table-from-xml-string