View Full Version : Transpose rows to cols


lpj2007
04-15-2008, 02:31 AM
Hi there

Sorry if this a stupid question that has beeen asked loads of times but all the threads of seem always seem to be trying to do the opposite of what i need to do. Im not sure transpose is the right word

I have a table with four rows

Color
------
red
orange
green
blue

and i would like to transform the data as the following in a query

color1 color2 color3 color4
----- ---- ----- ------
red orange green blue

Is this possible with a query?

Thanks

lpj

Dennisk
04-15-2008, 02:39 AM
yes it is possible using a CrossTab (Pivot table) query

lpj2007
04-15-2008, 02:56 AM
Thank you Dennisk, i have done that but is there any way to remove the nulls?

Dennisk
04-15-2008, 04:52 AM
in the underlying query use the NZ() function (Null to Zero)