A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merge different rows to same column in Access



 
 
Thread Tools Display Modes
  #1  
Old January 19th, 2006, 05:45 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Merge different rows to same column in Access

I've looked everywhere to find out how to do this but I couldn't
figure it out. I need to take a table and where the TG_ID is the same
but has different NPA and update ALL_NPA to look like that at the
bottom and where it only returns one line per TG_ID with all the
NPA's in ALL_NPA on the same line.

Query3
TG_ID NPA
13579 303
13579 720
13581 303
13581 720

TO

Query3
TG_ID ALL_NPA
13579 303, 720
13581 303, 720




Thanks

  #2  
Old January 19th, 2006, 05:48 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Merge different rows to same column in Access

Look here for the generic concatenate function:
http://www.rogersaccesslibrary.com/O...p#Hookom,Duane

--
Duane Hookom
MS Access MVP
--

"Micky" wrote in message
ps.com...
I've looked everywhere to find out how to do this but I couldn't
figure it out. I need to take a table and where the TG_ID is the same
but has different NPA and update ALL_NPA to look like that at the
bottom and where it only returns one line per TG_ID with all the
NPA's in ALL_NPA on the same line.

Query3
TG_ID NPA
13579 303
13579 720
13581 303
13581 720

TO

Query3
TG_ID ALL_NPA
13579 303, 720
13581 303, 720




Thanks



  #3  
Old January 19th, 2006, 07:43 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Merge different rows to same column in Access

Thanks Duane,

this is the query I use based on your example
ALL_NPA: Concatenate("SELECT NPA FROM TG_NPA WHERE TG_ID =" & [TG_ID])

And I get this error message:

Undefined function 'Concatenate' in expression.

any ideas why...I can't figure out what I'm doing wrong for the life of
me....

Micky

  #4  
Old January 19th, 2006, 07:58 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Merge different rows to same column in Access

ok, I found another one of your postings Duane which explained the
error message and the fix which works great!!!! thanks.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Worksheet Functions 23 January 30th, 2006 06:16 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Worksheet Functions 2 January 5th, 2006 02:03 AM
How to stop source prompt in mail merge from access mvb Mailmerge 0 September 6th, 2005 05:11 PM
Extra Access Instance with Automated Mail Merge Neil Ginsberg General Discussion 9 January 20th, 2005 02:41 AM
Deleting rows contains certain text in column A plumstone General Discussion 1 September 17th, 2004 08:05 PM


All times are GMT +1. The time now is 06:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.