single query to retrieve two xml results from one table

dc5dave

New Member
\[code\]TableClass Firstname Lastname markV John Lim 60V Wills smith 80VI Mark Bay 75VI Carl mark 65\[/code\]i have this table in my SQL. I need a single query to retrieve two different XML results based on the "class type" from one tableBelow is my expected results\[code\]Result1<Studentslist><Students> <class>V</class> <Firstname>John</Firstname> <Lastname>Lim</Lastname> <mark>60</mark></Students><Students> <class>V</class> <Firstname>Wills</Firstname> <Lastname>smith</Lastname> <mark>80</mark></Students></Studentslist>Result2<Studentslist><Students> <class>VI</class> <Firstname>Mark</Firstname> <Lastname>Bay</Lastname> <mark>75</mark></Students><Students> <class>VI</class> <Firstname>Carl</Firstname> <Lastname>mark</Lastname> <mark>65</mark></Students><Studentslist>\[/code\]many thanks!
 
Back
Top