var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query - Crosstab ?
Hi Good Morning,
I currently have a query that displays six columns:
Company | Product1 | Product2 | Product3 | Product4 | Product5
So one row displays one company with five different products.
What I need is some kind of query that will display the data like this:
Company | Product1
Company | Product2
Company | Product3
Company | Product4
Company | Product5
Basically the same company would be shown five times (on different rows) with the different Products on each.
I'm sure there's a way to do this with a crosstab but I could do with some new ideas as I'm in a rut !
Thanks very much in advance for your assistance.
Actually a crosstab does the reverse, taking properly normalized data and making it like your first example. You would need a UNION query to get the data from the first example to the second.
A union query would give you the desired results, for example:
SELECT Table.company, Table.part1
UNION SELECT Table.company, Table.part2
UNION SELECT Table.company, Table.part3