Need help with getting comma-separated values

Jul 7, 2013
Reaction score
Hi all, I am new to this forum and looking for help. I need to write a function that would return all the task codes from table tbl_task as a string of comma separated values but I am really stuck... I am working on an offline database in MS Access 2010. My table looks like this:
ID desc
1 2314
2 2485
3 8745
4 6874
5 8974

With this query:
SELECT ',' + tbl_task.desc
FROM tbl_task
ORDER BY tbl_task.desc;

I get a following output:

which is fine, but I need to put them in one string. What's the best way to do it? Any help appreciated!


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question