gringotani
asked on
Access query:contantenate "page number" if part ID filed is duplicate
Hi, Please give me the SQL to concatenate the page# with a comma, if the part ID is a duplicate. in the examples below, I would like to see widget_001 only display 1 row and to concatenate pages "2" and "10" as " 2, 10"
example of non concatenate:
A B
1 part_ID page#
2 widget-001 2
3 widget-001 10
4 widget-002 6`
5 widget-003 50
desired results:
A B
1 part_ID page#
2 widget-001 2, 10
4 widget-002 6`
5 widget-003 50
example of non concatenate:
A B
1 part_ID page#
2 widget-001 2
3 widget-001 10
4 widget-002 6`
5 widget-003 50
desired results:
A B
1 part_ID page#
2 widget-001 2, 10
4 widget-002 6`
5 widget-003 50
SELECT C.PART_ID, C.[PAGE #]
FROM C;
ASKER
I want to do it in Access. what is the SQL code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You have to write code to do the concatenation.