Guys,For some reason the XML output given by SSRS 2008 seems to put the fields in reverse order, has anyone come across this, it seems very wierd. For example, take this simple code:SELECT1 as ID,'ABC Capital' as Firm_Name,'123 The Lane' as Firm_Address_1,'London' as Firm_City,100000 as AUM_USD,'Retail, Consumer Goods' as IndustryUNIONSELECT2 as ID,'AXyZ Capital' as Firm_Name,'333 The Lane' as Firm_Address_1,'New York' as Firm_City,9999 as AUM_USD,'Food' as IndustryUNIONSELECT3 as ID,'ABC Capital' as Firm_Name,'1 The Lane' as Firm_Address_1,'Milan' as Firm_City,555 as AUM_USD,'Agriculture' as IndustryThe industry field comes first and the ID field last. I suppose this doesn't matter but conceptually it just looks odd.The output given by this:SELECT * FROM(SELECT1 as ID,'ABC Capital' as Firm_Name,'123 The Lane' as Firm_Address_1,'London' as Firm_City,100000 as AUM_USD,'Retail, Consumer Goods' as IndustryUNIONSELECT2 as ID,'AXyZ Capital' as Firm_Name,'333 The Lane' as Firm_Address_1,'New York' as Firm_City,9999 as AUM_USD,'Food' as IndustryUNIONSELECT3 as ID,'ABC Capital' as Firm_Name,'1 The Lane' as Firm_Address_1,'Milan' as Firm_City,555 as AUM_USD,'Agriculture' as Industry)xFOR XML PATHIn Management Studio, seems to make much more sense- it's in the same order as the select (not to mention the formatting).Has anyone else come across this, if so did they just put up with it, not use XML output from SSRS or do something different?Thanks in advance!
↧