Hi all
I have a table like this:
cn_name, fcst1, fdate1, fcst2, fdate2, ... fcst12, fdate12
I would like to know how to write hte query to return a result like this:
cn_name, fcst1, fdate1
cn_name, fcst2, fdate2
...
cn_name, fcst12, fdate12
At first it looks like i can use UNION ALL, but if I try that will the 12 resulting queries, I get an error message saying "too many unions".
Is there any way of transposing those columns to rows? Does Foxpro have a PIVOT equivelant that I can use? I'm running the query from VB.Net Code, and would prefer not running 12 queries.
Any help would be appreciated!![Big grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I have a table like this:
cn_name, fcst1, fdate1, fcst2, fdate2, ... fcst12, fdate12
I would like to know how to write hte query to return a result like this:
cn_name, fcst1, fdate1
cn_name, fcst2, fdate2
...
cn_name, fcst12, fdate12
At first it looks like i can use UNION ALL, but if I try that will the 12 resulting queries, I get an error message saying "too many unions".
Is there any way of transposing those columns to rows? Does Foxpro have a PIVOT equivelant that I can use? I'm running the query from VB.Net Code, and would prefer not running 12 queries.
Any help would be appreciated!