Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Question create XML from SQL for XML format

$
0
0
Would like to create XML format from SQL table Customers(col1,col2,col3) data with 1 row Only.<?xml version="1.0" ?><ALLRequests><TopHeader><Sensor user="myname" pw="mypassword" /></TopHeader><Main><NewRequest TypeOfRequest="Change"><NewParameter ATT="StaticV1" ATTV=Value from Col1 in Table Customers /><NewParameter ATT="StaticV2" ATTV=Value from Col2 in Table Customers/><NewParameter ATT="StaticV3" ATTV=Value from Col3 in Table Customers/></NewRequest></Main></ALLRequests>would like to create this using SQL so I can pass the resulting xml to a Stored Procedure for further execution.Thanks

Viewing all articles
Browse latest Browse all 3145

Trending Articles