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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query to export txt on 1 line

Status
Not open for further replies.

anthony777

Programmer
Nov 8, 2008
24
US
I have a column with custid
b2018
b2727
b324b

I need it to export to txt delimited in the following format
b2018, b2727, b324b
there is a space after each coma
 
You should check the FAQs prior to asking a question. This one might help faq701-4233. If the title of the FAQ didn't cause you to think it was appropriate, let us know.

Duane
Hook'D on Access
MS Access MVP
 
Expr1: SELECT[customer id],
Concatenate("SELECT [Customer ID].tbl0316cust")'

I am trying to have all the custid from one column come out in this format b2018, b2727, b324b can anyone show me how thanks
 
Try this SQL:
Code:
SELECT Concatenate("SELECT [Customer ID] FROM tbl0316Cust") AS CustomerIDs
FROM tbl0316Cust
GROUP BY Concatenate("SELECT [Customer ID] FROM tbl0316Cust");
This assumes you have imported the module with the function into your MDB.

Duane
Hook'D on Access
MS Access MVP
 

Access keeps telling me the following syntax is wrong can some one help

SELECT[customer id],
Concatenate("SELECT [Customer ID].tbl0316cust")'

 
d hook up I am a newbie kind of what do I put in the function and how can I run it from a query


for example where does this code go? Function it gives error>

SELECT Concatenate("SELECT [Customer ID] FROM tbl0316Cust") AS CustomerIDs
FROM tbl0316Cust
GROUP BY Concatenate("SELECT [Customer ID] FROM tbl0316Cust
 
Create a brand new query without selecting any table and paste the following in the SQL View pane:
Code:
SELECT DISTINCT Concatenate("SELECT [Customer ID] FROM tbl0316Cust") AS CustomerIDs
FROM tbl0316Cust
BTW, you have created the Concatenate function in a standard module, did you ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
BTW no I did not create the function I do not know the code to put in the function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top