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

Access Columns to "Concatenate" 2

Status
Not open for further replies.

jfussell

Technical User
Jul 17, 2001
66
US
I don't know if this is possible for Access to do, but I have 2 columns of data, one is the project #, the other is the project description. I know in MS Excel I am able to concatenate 2 columns of data into one, and I was curious if the same could be done in Access, and if so, how. Please let me know if I need to go more in depth with my question. Thanks!
 
You can do it.

Select id, (project# + " - " + ProjectDesc) as myproj
From theprojecttable
 
Thank you for your help on this. I am not at all very efficient in Access, can you please go a little further into detail on how to get this done? Thank you tons.
 
substitute your names for the names I used and then go into the query grid. From the View menu select sql view and paste in the sql that you modified and then switch to design view and you will see how you would need to build using the query grid. I am assuming you know how to build queries.
 
Ok, I must still be doing something wrong... here's my text:


SELECT [TSI Projects].Status, [TSI Projects].[Project#], [TSI Projects].ProjectDesc, [TSI Projects], (Project# + " - " + ProjectDesc)
FROM [TSI Projects]
WHERE ((([TSI Projects].Status)="Active"))
ORDER BY [TSI Projects].[Project#];


but for some reason, it's giving me an error in date in query expression, then it highlights the expression that you gave me. What am I doing wrong?
 
You've got some issues with your SQL:

Code:
SELECT [TSI Projects].Status, [TSI Projects].[Project#], [TSI Projects].ProjectDesc,
[TSI Projects]
Code:
, (Project# + " - " + ProjectDesc) As ProjectInfo
FROM [TSI Projects]
WHERE ((([TSI Projects].Status)="Active"))
ORDER BY [TSI Projects].[Project#];

isn't the bolded part your table name? It doesn't have a field with it. Try this instead:

Code:
SELECT [TSI Projects].Status, [TSI Projects].[Project#], [TSI Projects].ProjectDesc, ([TSI Projects].[Project#] + " - " + [TSI Projects].ProjectDesc)
FROM [TSI Projects]
WHERE ((([TSI Projects].Status)="Active"))
ORDER BY [TSI Projects].[Project#];

Leslie
 
Thank you so much cmmrfrds and Leslie!! That worked! You just saved me! Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top