May 17, 2009 at 10:54 pm
Hi,
I am not able to find a proper solution to paging and sorting for XML outputs in 2005.
After querying different tables
I have the following output as XML
'
'
If I sort by InvetsorName tag2 should be the first tag, if I sort by order1 amount tag2 shoule be first, if I sort by order2 amount tag1 should be fisrt. How Do i achieve this.
May 17, 2009 at 11:13 pm
You need to put XMl in code tags to be visible here, like this:
123
test
first
1000
second
2000
234
abc
first
100
second
200
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 17, 2009 at 11:58 pm
I still seem to be failing to get the XML tags in readable format. Your help is much appreciated
May 18, 2009 at 6:50 am
Goto my earlier post (above) and hit the "QUOTE" button. This allows you to reply to a post, and also includes the whole thing quoted, as I originally wrote it (that's how I got your XML). In there you will see that I have enclosed your XML list in IFCode "code" tags that look like this:
... {your xml} ...[ /code]
except that I have added an extra space in the closing one to keep them from activating so that they will stay visible. for this discussion.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 18, 2009 at 10:38 am
APARNA (5/17/2009)
If I sort by InvetsorName tag2 should be the first tag, if I sort by order1 amount tag2 shoule be first, if I sort by order2 amount tag1 should be fisrt. How Do i achieve this.
I try to convert your conclusion into XPath and the representing result (by investor id):
You: If I sort by InvetsorName tag2 should be the first tag
XPath: issue/investor/name
Result: 234, 123
You: if I sort by order1 amount tag2 shoule be first
XPath: issue/investor/orders/order[1]/amount
Result: 234, 123
You: if I sort by order2 amount tag1 should be fisrt
XPath: issue/investor/orders/order[2]/amount
Result: 234, 123
... I used the XML posted by Barry (thanks! ;-)). investor "234" order2 has an amount of 200, investor "123" order2 has an amount of 2000.
Greets
Flo
May 27, 2009 at 7:45 pm
Sorry to be replying very late on this issue, thank you for your comments, As I had to quickly deliver the project I converted into a data set by pivoting the results and ordered by accordingly.
Thanks
Aparna
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply