Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Build string from SQL/Query result

Status
Not open for further replies.

NXMold

Technical User
Jul 22, 2008
104
I made a query to return a single column of results, which I want to combine into a string value separated by commas. I wish to do this programmaticaly without the query.

The query returns 0-10 results, so the string I want is "[record1], [record2], [record3], [record4]". If zero records are found, a null or blank string is ok. Can I use a recordset to build this string? I don't really understand recordsets, any tips on how to proceed?

Access 2000


[Find by Original Job] = "some text"

SELECT CMEJobList.CMEJobNumber FROM CMEJobList WHERE (((CMEJobList.RefOrigBuild)=[Find by Original Job]));
 
dhookom has one such sample in the faq section of the query forum, check out faq701-4233

Roy-Vidar
 
Exactly what I needed, works perfectly. Thank you for pointing that out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top