Combine multiple rows into one single column (1 Viewer)

RayJ

New member
Local time
Today, 11:47
Joined
Apr 6, 2022
Messages
9
I am trying to build a query from a table (Tbl_XYZ) that will give me the information for the primary key all in one row rather then creating dups for that primary key and showing up with multiple rows. Example below.( this is just a sample)

Account NumberSystem_NameTable_Name
012345DWCustomer
012345DWSales
012345DWAddress
012345AWSaws_Cust
012345AWSaws_product
I was thinking creating 2 separate tables for System_Name and Table_Name but it would still give me values in different rows since the table names are different.

My expectation :

Account NumberSystem_NameTable_Name
012345DWCustomer / Sales / Address
012345AWSaws_Cust / aws_product
Any help with this would be greatly appreciated.

I am using MS Access 2013.

Thanks.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:47
Joined
Feb 19, 2002
Messages
42,970
In reality, what you have belongs in THREE tables not one. Then you have no duplicate primary keys.

As Maj suggested, there are concatenation functions that can return coma separated lists in one column but you would NEVER store your data this way.
 

RayJ

New member
Local time
Today, 11:47
Joined
Apr 6, 2022
Messages
9
In reality, what you have belongs in THREE tables not one. Then you have no duplicate primary keys.

As Maj suggested, there are concatenation functions that can return coma separated lists in one column but you would NEVER store your data this way.
I am using this query just for a reporting purpose. I wanted to transfer this data on an excel file without creating dups.
 

Users who are viewing this thread

Top Bottom