Re: Output nested set model (--CELKO--) to XML

From: Ian Bell <kullar_bell_at_hotmail.com>
Date: 19 Sep 2002 00:41:45 -0700
Message-ID: <25f42dfe.0209182341.c922087_at_posting.google.com>


Simon...

After speaking to you...

You can use derived tables syntax to get just the xml text back without the lft column by using the following:

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

seems to work, but obviously do the testing!

regards

Ian Received on Thu Sep 19 2002 - 09:41:45 CEST

Original text of this message