Hi,
Before anyone jumps up and down about not trying to search for an answer, I HAVE!
I found alot of talk about going from multiple rows into a single row with multiple columns, but cant find anything about going the other way.
I basically have a wide table with 12 columns (JAN, FEB, MAR etc) like so:
X 100 150 200 80 ...
... and what I want to retrieve into 12 rows and fob a date like:
X '01JAN09' 100
X '01FEB09' 150
X '01MAR09' 200
etc.
I've tried using a UNION ALL ...but thats just so messy, I'll end up with 200 line SQL query! Surely theres a better way ?
Before anyone jumps up and down about not trying to search for an answer, I HAVE!
I found alot of talk about going from multiple rows into a single row with multiple columns, but cant find anything about going the other way.
I basically have a wide table with 12 columns (JAN, FEB, MAR etc) like so:
X 100 150 200 80 ...
... and what I want to retrieve into 12 rows and fob a date like:
X '01JAN09' 100
X '01FEB09' 150
X '01MAR09' 200
etc.
I've tried using a UNION ALL ...but thats just so messy, I'll end up with 200 line SQL query! Surely theres a better way ?