September 28, 2011 at 5:34 am
Hi All,
I wanted the resulted xml to look like this :
<Root>
<QueryWaiting version="B000">
<Authentication id="57985539">NQIGUTXD</Authentication>
</QueryWaiting>
<QueryWaiting version="B000">
<Authentication id="57985540">FONFSNPX</Authentication>
</QueryWaiting>
</Root>
But the code of mine is not getting exactly. Please do find the code below and let me know the changes :
SELECT 1 AS Tag,
NULL AS Parent,
'B000' AS 'QueryWaiting!1!version' ,
NULL AS 'Authentication!2!id' ,
NULL AS 'Authentication!2!'
Union ALL
SELECT
2 as tag,
1 as parent,
NULL,
ControlStationID,
[Password]
FROM SW_ControlStations
FOR XML EXPLICIT ,ROOT('Root')
Please help me asap
September 29, 2011 at 9:20 am
If you could post the code for creating the table and some sample data it would help.
MCITP SQL 2005, MCSA SQL 2012
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply