Guest_imported
New member
- Jan 1, 1970
- 0
Is it possible in Jet SQL to create a query (using a sub-query if necessary) that will return the concatenated values in Column 'X' from all rows in a single field.
For example, table = tblColors
Number Color
====== =====
1 Blue
2 Green
3 Yellow
SELECT tblColors.Color AS AllColors
Result wanted:
AllColors
=========
BlueGreenYellow
Result not wanted:
AllColors
=========
Blue
Green
Yellow
Reason: I want to see if it's possbile to have a Jet SQL query generate an .XML file. The way I was intending was to have the parent query return (XML Header) + (Sub-query: returning a string consisiting of individual tag/data iterations) + (XML footer).
The problem is that instead of getting 1 record returned by the parent query with (header)+(data x 'n')+(footer) I get multiple records returned with (header) + (data x 1) + (footer). Each of which is well formed .XML by the way.
I know I could do this in T-SQL using variables and looping to build up the result, but I would like to know whether it's possible in Jet-SQL.
Thanks
For example, table = tblColors
Number Color
====== =====
1 Blue
2 Green
3 Yellow
SELECT tblColors.Color AS AllColors
Result wanted:
AllColors
=========
BlueGreenYellow
Result not wanted:
AllColors
=========
Blue
Green
Yellow
Reason: I want to see if it's possbile to have a Jet SQL query generate an .XML file. The way I was intending was to have the parent query return (XML Header) + (Sub-query: returning a string consisiting of individual tag/data iterations) + (XML footer).
The problem is that instead of getting 1 record returned by the parent query with (header)+(data x 'n')+(footer) I get multiple records returned with (header) + (data x 1) + (footer). Each of which is well formed .XML by the way.
I know I could do this in T-SQL using variables and looping to build up the result, but I would like to know whether it's possible in Jet-SQL.
Thanks