G
Guest
Hi all,
I'm having a problem and maybe someone has an answer to it: I have a table
that has records with 12 values each one representing the total number of
visitors of that month of the year. Of course, the year is an important index
for that table. For field grouping purposes, I need to make one or several
queries that returns a record with the 12 fields for that year and 2 other
(the november and december values) from the record of the previous year.
For example, I have a table Visitors with the following fields and values:
year,v01,v02,v03,v04,v05,v06,v07,v08,v09,v10,v11,v12
2004,23,34,45,43,32,21,12,23,45,55,44,33
2003,99,98,97,96,95,89,88,87,86,85,79,78
2002,55,56,57,58,59,65,66,67,68,69,75,76
And I want the output
year,v-1,v-0,v01,v02,v03,v04,v05,v06,v07,v08,v09,v10,v11,v12
2004,79,78,23,34,45,43,32,21,12,23,45,55,44,33
2003,75,76,99,98,97,96,95,89,88,87,86,85,79,78
Anyone knows a way to do this using only queries withou development code?
Thanks.
Pedro L.
I'm having a problem and maybe someone has an answer to it: I have a table
that has records with 12 values each one representing the total number of
visitors of that month of the year. Of course, the year is an important index
for that table. For field grouping purposes, I need to make one or several
queries that returns a record with the 12 fields for that year and 2 other
(the november and december values) from the record of the previous year.
For example, I have a table Visitors with the following fields and values:
year,v01,v02,v03,v04,v05,v06,v07,v08,v09,v10,v11,v12
2004,23,34,45,43,32,21,12,23,45,55,44,33
2003,99,98,97,96,95,89,88,87,86,85,79,78
2002,55,56,57,58,59,65,66,67,68,69,75,76
And I want the output
year,v-1,v-0,v01,v02,v03,v04,v05,v06,v07,v08,v09,v10,v11,v12
2004,79,78,23,34,45,43,32,21,12,23,45,55,44,33
2003,75,76,99,98,97,96,95,89,88,87,86,85,79,78
Anyone knows a way to do this using only queries withou development code?
Thanks.
Pedro L.