Click here to Skip to main content
16,011,428 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to select 1 entry without using "top 1" in SQL query? Pin
Jon Hulatt9-Oct-02 0:34
Jon Hulatt9-Oct-02 0:34 
GeneralRe: How to select 1 entry without using "top 1" in SQL query? Pin
Nick Parker9-Oct-02 1:43
protectorNick Parker9-Oct-02 1:43 
QuestionUpdating Access Queries using SQL? Pin
Paul Riley8-Oct-02 14:24
Paul Riley8-Oct-02 14:24 
AnswerRe: Updating Access Queries using SQL? Pin
Mazdak9-Oct-02 9:21
Mazdak9-Oct-02 9:21 
GeneralRe: Updating Access Queries using SQL? Pin
Paul Riley9-Oct-02 11:45
Paul Riley9-Oct-02 11:45 
AnswerRe: Updating Access Queries using SQL? Pin
Mazdak9-Oct-02 23:12
Mazdak9-Oct-02 23:12 
GeneralRe: Updating Access Queries using SQL? Pin
Paul Riley9-Oct-02 23:36
Paul Riley9-Oct-02 23:36 
GeneralOutput Nested Set Model to XML using MS SQL2K Pin
Ingram Leedy8-Oct-02 9:34
Ingram Leedy8-Oct-02 9:34 
Anyone any experience of outputting a nested set model (to an XML
structure using Microsoft SQL Server? Would like to read in as a stream using ExecuteXmlReader.

For details on Nested Set Model, see the chapter in JOE CELKO'S SQL FOR SMARTIES (Morgan-Kaufmann, 1999, second edition)
http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci537290,00.html
http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci801943,00.html

> For example using the following table and TSQL I can extract an
> employee and their subordinates.
>
> Personnel
> emp lft rgt
> ======================
> 'Albert' 1 12
> 'Bert' 2 3
> 'Chuck' 4 11
> 'Donna' 5 6
> 'Eddie' 7 8
> 'Fred' 9 10

Example XML output:


<root>
<node emp="Albert">
<node emp="Bert"/>
<node emp="Chuck">
<node emp="Donna"/>
<node emp="Eddie"/>
<node emp="Fred"/>
</node>
</node>
</root>


This works, but isnt an XML stream:

SELECT xml1.xmltext
FROM
(SELECT lft, xmltext = '<node emp="' + emp + '">' FROM Personnel
UNION ALL SELECT rgt, xmltext = '</node>' FROM Personnel) AS xml1
ORDER BY xml1.lft





-- Ingram Leedy
Generalreading Excel from ASP.NET Pin
ViteshAggarwal8-Oct-02 2:39
ViteshAggarwal8-Oct-02 2:39 
GeneralRe: reading Excel from ASP.NET Pin
Ed Gadziemski8-Oct-02 4:46
professionalEd Gadziemski8-Oct-02 4:46 
GeneralRe: reading Excel from ASP.NET Pin
Carlos Antollini10-Oct-02 6:27
Carlos Antollini10-Oct-02 6:27 
Generalreading Excel file from ASp.NEt Pin
ViteshAggarwal8-Oct-02 2:36
ViteshAggarwal8-Oct-02 2:36 
GeneralXMLA Function Parser Pin
Anonymous7-Oct-02 7:53
Anonymous7-Oct-02 7:53 
GeneralMS acess for ASP Pin
Sarvesvara (BVKS) Dasa6-Oct-02 23:30
Sarvesvara (BVKS) Dasa6-Oct-02 23:30 
GeneralRe: MS acess for ASP Pin
Jon Hulatt7-Oct-02 0:29
Jon Hulatt7-Oct-02 0:29 
GeneralRe: MS acess for ASP Pin
Sarvesvara (BVKS) Dasa7-Oct-02 6:42
Sarvesvara (BVKS) Dasa7-Oct-02 6:42 
GeneralRe: MS acess for ASP Pin
Nick Parker7-Oct-02 8:45
protectorNick Parker7-Oct-02 8:45 
GeneralRe: MS acess for ASP Pin
Sarvesvara (BVKS) Dasa7-Oct-02 9:38
Sarvesvara (BVKS) Dasa7-Oct-02 9:38 
GeneralRe: MS acess for ASP Pin
James T. Johnson7-Oct-02 11:32
James T. Johnson7-Oct-02 11:32 
GeneralRe: MS acess for ASP Pin
Sarvesvara (BVKS) Dasa7-Oct-02 17:30
Sarvesvara (BVKS) Dasa7-Oct-02 17:30 
GeneralRe: MS acess for ASP Pin
Nick Parker8-Oct-02 2:52
protectorNick Parker8-Oct-02 2:52 
GeneralRe: MS acess for ASP Pin
Sarvesvara (BVKS) Dasa8-Oct-02 8:06
Sarvesvara (BVKS) Dasa8-Oct-02 8:06 
QuestionADO programming in C++? Pin
Rickard Andersson204-Oct-02 10:55
Rickard Andersson204-Oct-02 10:55 
AnswerRe: ADO programming in C++? Pin
Nick Parker5-Oct-02 1:45
protectorNick Parker5-Oct-02 1:45 
AnswerRe: ADO programming in C++? Pin
Jon Hulatt6-Oct-02 22:20
Jon Hulatt6-Oct-02 22:20 

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.