Hi,
Can only use Access SQL for below tables and after trying different queries, like crosstab giving different result.
One crosstab result appears with unique row with separate columns for itemref.
Looking forward to get output as below:
[pre]Output Required:
Cust_Name Cust_Login Cust_Email ItemRef
Me Chin Me.chin me.chin@gmail.com I209N
Ken Mark Ken Mark KenMark@gmail.com I209N
Jack Cole JackC JCole@gmail.com I546R,I381E
Tim Smith TSmith TimSmith@gmail.com I987N[/pre]
Below Tables are used:
[pre]Table: Product
ItemNo ItemName List
I201N Item_Nice A
I209N New Launch A
I315R Runner A
I987N Lead Matt B
I546R Climber C
I381R Chromite C
Table: UserList
Cust_Name Cust_Login Cust_Email ItemRef
Me Chin Me.chin me.chin@gmail.com I209N
Ki Chen KyeChen Kye_Chen@gmail.com I209N
Me Chin MeChin me.chin@gmail.com I209N
Tim Smith TSmith TimSmith@gmail.com I987N
Ken Mark Ken Mark KenMark@gmail.com I209N
Jack Cole JackC JCole@gmail.com I546R
Jack Cole JackC JCole@gmail.com I381E[/pre]
Please guide/input/suggest/help/assist.
Thanks,
Ken
Can only use Access SQL for below tables and after trying different queries, like crosstab giving different result.
One crosstab result appears with unique row with separate columns for itemref.
Code:
Select distinct cust_email, Item_ref
from UserList UL
right join Product P on UL.itemref = p.itemNo
order by cust_email, ItemRef
Looking forward to get output as below:
[pre]Output Required:
Cust_Name Cust_Login Cust_Email ItemRef
Me Chin Me.chin me.chin@gmail.com I209N
Ken Mark Ken Mark KenMark@gmail.com I209N
Jack Cole JackC JCole@gmail.com I546R,I381E
Tim Smith TSmith TimSmith@gmail.com I987N[/pre]
Below Tables are used:
[pre]Table: Product
ItemNo ItemName List
I201N Item_Nice A
I209N New Launch A
I315R Runner A
I987N Lead Matt B
I546R Climber C
I381R Chromite C
Table: UserList
Cust_Name Cust_Login Cust_Email ItemRef
Me Chin Me.chin me.chin@gmail.com I209N
Ki Chen KyeChen Kye_Chen@gmail.com I209N
Me Chin MeChin me.chin@gmail.com I209N
Tim Smith TSmith TimSmith@gmail.com I987N
Ken Mark Ken Mark KenMark@gmail.com I209N
Jack Cole JackC JCole@gmail.com I546R
Jack Cole JackC JCole@gmail.com I381E[/pre]
Please guide/input/suggest/help/assist.
Thanks,
Ken