Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

XML Query Expand / Collapse
Author
Message
Posted Tuesday, October 6, 2009 11:51 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, July 25, 2014 12:45 AM
Points: 738, Visits: 275
Comments posted to this topic are about the item XML Query
Post #798938
Posted Wednesday, October 7, 2009 5:45 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, July 24, 2012 11:01 AM
Points: 50, Visits: 246
SELECT id as 'data()',
customer as 'data()'
FROM #customers AS customesra
ORDER BY customer DESC
FOR XML PATH(''),ROOT('customers')

I cannot view the full XML string.
Post #799083
Posted Wednesday, October 7, 2009 7:31 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 7:31 AM
Points: 1,295, Visits: 786
I'm getting the same result for all the 4 queries posted.

anybody else?



Lucky
Post #799151
Posted Wednesday, October 7, 2009 7:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, November 2, 2009 7:39 AM
Points: 25, Visits: 23
"None of them" was not a choice so I picked all of them since they all return the same result.
Post #799163
Posted Wednesday, October 7, 2009 7:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, November 2, 2009 7:39 AM
Points: 25, Visits: 23
To setiv:

If you want everything you need to set the "Results To Text" option. It's under Tools/Options/Query Results/SQL Server or better yet, if you have the right toolbar showing you can just click on the icon.
Post #799169
Posted Wednesday, October 7, 2009 8:49 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
I am bad at XML, actually very bad. Have to execute each code in SSMS and then see the difference.

But still, what acually is different in C except that you see alias customersa and customersb, where as results are same and what is common between A, B and D queries ?


May be a person with good XML knowledge can explain.


SQL DBA.
Post #799234
Posted Wednesday, October 7, 2009 8:50 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
lucky-80472 (10/7/2009)
I'm getting the same result for all the 4 queries posted.

anybody else?


you see alias customersa and customersb in the resultset of C. where as in all other queries it's customers.


SQL DBA.
Post #799236
Posted Wednesday, October 7, 2009 9:48 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, September 12, 2014 8:38 AM
Points: 3,675, Visits: 72,434
Sanjay is right.... it got me because I wasn't reading clearly.

<customersa customers.id="6">

Is not the same as
<customers customers.id="6">



:) Good question... shows me why I hate xml as much as I do :)




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #799312
Posted Wednesday, October 7, 2009 10:02 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, July 24, 2012 11:01 AM
Points: 50, Visits: 246
This will not help. I need to buy a new computer.
Post #799333
Posted Wednesday, October 7, 2009 10:52 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, September 12, 2014 8:38 AM
Points: 3,675, Visits: 72,434
Setiv,

also open Tools -> Options -> Results to text and set the maximum length to a value higher than 256. I set mine to 4000 which works wonderfully :)




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #799367
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse