How to transform data to crosstab-like format?

amolin

Registered User.
Local time
Today, 14:42
Joined
Apr 29, 2004
Messages
35
May i reach following function by Grid Query design or by SQL


Original:
==============================================
Factory 1-----------Product A
Factory 1-----------Product B
Factory 1-----------Product C
Factory 1-----------Product D


Factory 2-----------Product D
Factory 2-----------Product E
Factory 2-----------Product F

Factory 3-----------Product D
Factory 3-----------Product E
Factory 3-----------Product F


Result:
==============================================
Factory 1-----------Product A,Product B,Product C,Product D
Factory 2-----------Product D,Product E,Product F
Factory 3-----------Product D,Product E,Product F
 
Just use the crosstab query wizard - it will be one of the choices when you create a new query.
 
Just use the crosstab query wizard - it will be one of the choices when you create a new query.

thank you for yor reply, but cross tab couldn't get what i want:

i need two column table, if by cross tab wizard, it will generate multi column dtable.
 
What if you make the crosstab query, then make a new select query based on the crosstab query to concatenate the values into one column.
 
What if you make the crosstab query, then make a new select query based on the crosstab query to concatenate the values into one column.

Thank you Alisa;

If we have hundreds of products, then we need involve hundreds of fields involved in the Select query, for most time, the number of products name are not the same all the time.

Best Regards
 
Last edited:
Thank you, Mike;

They give a short code to achive this.

Seems no better method to get this done by SQL.
 

Users who are viewing this thread

Back
Top Bottom