listing information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I hope someone can help me with this please!

I have a query that is a list of clients. The clients are assigned a group
number. There may be one client in a group or multiple clients in a group.
My question is this:

I want to group the data by the group number but I would like a field that
will give me all the client numbers seperated by a ",". Is this possible.

Original Query fields
1. Group number
2. Client number
3. Client name
4. Revenue

Desired query fields
1. Group number
2. Client numbers
3. Revenue

Thanks in advance
 
Hi,


In two queries:


SELECT DISTINCT ClientNumbers, iif( false, " ", null) as Groups INTO temp
FROM originalTable



UPDATE temp INNER JOIN originalTable ON
temp.ClientNumbers=originalTable.ClientNumbers SET Groups = (Groups + ", ")
& CStr(originalTable.[Group Number] )



the result should then be in table temp.




Hoping it may help,
Vanderghast, Access MVP
 
Thank you so much!

Michel Walsh said:
Hi,


In two queries:


SELECT DISTINCT ClientNumbers, iif( false, " ", null) as Groups INTO temp
FROM originalTable



UPDATE temp INNER JOIN originalTable ON
temp.ClientNumbers=originalTable.ClientNumbers SET Groups = (Groups + ", ")
& CStr(originalTable.[Group Number] )



the result should then be in table temp.




Hoping it may help,
Vanderghast, Access MVP

Stacey said:
I hope someone can help me with this please!

I have a query that is a list of clients. The clients are assigned a
group
number. There may be one client in a group or multiple clients in a
group.
My question is this:

I want to group the data by the group number but I would like a field that
will give me all the client numbers seperated by a ",". Is this possible.

Original Query fields
1. Group number
2. Client number
3. Client name
4. Revenue

Desired query fields
1. Group number
2. Client numbers
3. Revenue

Thanks in advance
 
Back
Top