Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
misterraj
Yak Posting Veteran
94 Posts |
Posted - 2005-03-22 : 07:31:33
|
| I generate a xml file from a select stmt, and it looks like<TRANSACTION_IMAGE> <ORG_ID>001</ORG_ID> <SITE_CODE>CIN</SITE_CODE> <TRNSIMAGE> <TRNSIMAGE_ITEM> <CONTINUATION>2</CONTINUATION> </TRNSIMAGE_ITEM> <TRNSIMAGE_ITEM> <CONTINUATION>1</CONTINUATION> </TRNSIMAGE_ITEM> <TRNSIMAGE_ITEM> <CONTINUATION>3</CONTINUATION> </TRNSIMAGE_ITEM> </TRNSIMAGE> </TRANSACTION_IMAGE> BUT what i need is ordering according to the continuation tag. i want 1 come first then 2 and so on, but in my case it is not like that. where should i put my hands??? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-22 : 07:44:53
|
have you tried putting the order by in your select statment?Go with the flow & have fun! Else fight the flow |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-03-22 : 09:11:25
|
| In my experience you need to order by the PK columns of each table in the UNION, in order.At a guess:TRANSACTION_IMAGE.ORG_ID, TRNSIMAGE_ITEM.CONTINUATIONKristen |
 |
|
|
|
|
|