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!

Group by with concatenation function

Status
Not open for further replies.

Bryyan

Technical User
Apr 15, 2010
2
CA
Hi,
Can someone help me.
I have been trying to group by with Duane Hookum's concatenation function, but can't figure it out.
This function doesn't need a grouping to do it.

My table it is like this:

TestPackId, Lineclass
11, A3A
11, W4G
11, A4A
11, A4A
11, W4G
12, A3A
12, W4G
12, A3A
12, A3A
13, W4G
13, S5B
13, S5B
14, T5A

What I am getting Now is:
Using - LineClass: Concatenate("SELECT [LineClass] FROM [TestInfo tbl] WHERE TestPackID =" & [TestInfo tbl].[TestPackID])
11 - A3A,W4G,A4A,A4A,W4G
12 - A3A,W4G,A3A,A3A
13 - W4G,S5B,S5B
14 - T5A

I would like the query to make: (No Doubles and In Alpha order)
11 - A3A,A4A,W4G
12 - A3A,W4G
13 - S5B,W4G
14 - T5A

I tried adding to this -- LineClass: Concatenate("SELECT [LineClass] FROM [TestInfo tbl] WHERE TestPackID =" & [TestInfo tbl].[TestPackID])
FROM TestInfo tbl
GROUP BY LineClass;
Still doesn't work

Thanks Bryyan
 
Thanks.
I tried that and that is exacly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top