-
Dynamic WHERE clausel in "FOR XML EXPLICIT" query
Does anyone know how to build a dynamic query with a dynamic WHERE clausel
(which also may be empty) in a "for xml EXPLICIT" statement?
I mean something like ...
select 10 as Tag,
null as Parent,
null as [DATA!10],
...
Union All
select 20, -- as Tag,
10, -- as Parent,
'Blah', -- as [DATA!10],
...
where ID = @id // and maybe some more conditions
for xml EXPLICIT
Maybe it would be nice to have also a dynamic ORDER BY clause.
Thanks for any good ideas about it!!!
Carsten.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|