Click here to Skip to main content
15,887,434 members
Home / Discussions / Database
   

Database

 
AnswerRe: Sqlite Database Pin
Eddy Vluggen10-Dec-09 11:20
professionalEddy Vluggen10-Dec-09 11:20 
Questiondatabase Pin
farokhian9-Dec-09 22:28
farokhian9-Dec-09 22:28 
AnswerRe: database [crosspost] Pin
Eddy Vluggen10-Dec-09 0:36
professionalEddy Vluggen10-Dec-09 0:36 
AnswerRe: database Pin
Niladri_Biswas10-Dec-09 0:39
Niladri_Biswas10-Dec-09 0:39 
Questionproblem while import TXT file Pin
koolprasad20039-Dec-09 19:48
professionalkoolprasad20039-Dec-09 19:48 
AnswerRe: problem while import TXT file Pin
_Damian S_9-Dec-09 20:23
professional_Damian S_9-Dec-09 20:23 
GeneralRe: problem while import TXT file Pin
koolprasad200310-Dec-09 22:24
professionalkoolprasad200310-Dec-09 22:24 
QuestionTable result to Xml Pin
Fayu9-Dec-09 5:31
Fayu9-Dec-09 5:31 
Hi,

I am trying to convert a table result to a xml. For example, I have a result (Figure 1) and I want to make an xml out of it (Figure 2).

I have tried the FOR XML RAW and FOR XML AUTO but this does not seem to give me the tree structure. Any ideas?

Figure 1:
Parent     Id     Name
-----------------------
0          1       Root
0          2       Root 2
1          3       Child 1
1          4       Child 2
3          5       Child 3
4          6       Child 4
9          7       Child 5


Figure 2:
<NodeCollection>
   <Node rId=1 Parent=0 Name='Root'>
      <Node rId=3 Parent=1 Name='Child 1'>
          <Node rId=5 Parent=3 Name='Child 3' />
      </Node>
      <Node rId=4 Parent=1 Name='Child 2'>
          <Node rId=6 Parent=4 Name='Child 4' />
      </Node>
   </Node>
   <Node rId=2 Parent=0 Name='Root 2' />
   <Node rId=7 Parent=9 Name='Child 5' />
</NodeCollection>

AnswerRe: Table result to Xml Pin
Riaan Booyzen9-Dec-09 20:05
Riaan Booyzen9-Dec-09 20:05 
QuestionSQL query optimization Pin
Member 46483709-Dec-09 1:59
Member 46483709-Dec-09 1:59 
AnswerRe: SQL query optimization Pin
WoutL9-Dec-09 2:30
WoutL9-Dec-09 2:30 
GeneralRe: SQL query optimization [modified] Pin
Member 46483709-Dec-09 3:02
Member 46483709-Dec-09 3:02 
GeneralRe: SQL query optimization Pin
Member 46483709-Dec-09 3:47
Member 46483709-Dec-09 3:47 
GeneralRe: SQL query optimization Pin
WoutL9-Dec-09 20:46
WoutL9-Dec-09 20:46 
AnswerRe: SQL query optimization Pin
_Damian S_9-Dec-09 19:24
professional_Damian S_9-Dec-09 19:24 
Questionsystem error code 126 Pin
T21029-Dec-09 1:21
T21029-Dec-09 1:21 
Question"Syscomments" system table corrupted Pin
www.Developerof.NET9-Dec-09 0:28
www.Developerof.NET9-Dec-09 0:28 
AnswerRe: "Syscomments" system table corrupted Pin
Ashfield9-Dec-09 1:17
Ashfield9-Dec-09 1:17 
QuestionSQL Copy Table in C# Pin
bxlorenz8-Dec-09 13:40
bxlorenz8-Dec-09 13:40 
AnswerRe: SQL Copy Table in C# Pin
loyal ginger8-Dec-09 15:49
loyal ginger8-Dec-09 15:49 
AnswerRe: SQL Copy Table in C# Pin
Niladri_Biswas8-Dec-09 21:36
Niladri_Biswas8-Dec-09 21:36 
AnswerRe: SQL Copy Table in C# Pin
Paul Voicu10-Dec-09 2:06
Paul Voicu10-Dec-09 2:06 
QuestionINSTEAD OF trigger Pin
Member 47041438-Dec-09 13:34
Member 47041438-Dec-09 13:34 
AnswerRe: INSTEAD OF trigger Pin
David Skelly8-Dec-09 23:43
David Skelly8-Dec-09 23:43 
GeneralRe: INSTEAD OF trigger [modified] Pin
Member 47041439-Dec-09 0:30
Member 47041439-Dec-09 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.