Need help with getting comma-separated values

Joined
Jul 7, 2013
Messages
1
Reaction score
0
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:
Expr1000
,2314
,2485
,6874
,8745
,8974

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

Top