how to output multiple receds from one record in a query

M

mg

ok, last one.

in a query, i want to SELECT records, and output multiple records for each
one in the source table.
example:
source record fields = <company1, blue, red, yellow>
i want to output:
company1,blue
company1,red
company1,yellow

reason: i need a report to show companies GROUPED by the colors: (and each
company can have multiple colors)
blue:
company1
company7
company44
red:
company1
company2
company55
 
D

Douglas J. Steele

SELECT Field1, Field2
FROM MyTable
UNION
SELECT Field1, Field3
FROM MyTable
UNION
SELECT Field1, Field4
FROM MyTable
 
M

mg

thanks, i'll try that. i assume i can mix-in other tools like mid$, case,
switch, etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top