mrmookster
Programmer
I have a table with row data held as one row per edit, against each row is an edit date. querying this table would be much more efficient (i think) if i could use a join between dates, ie if the table had date_from and date_to columns to replace the edit_date colomn.
how do i go about transposing this data to a temp table or view ... i suspect it will be using cursors
ie go from
xxx,01/01/2001,yyy,zzz
xxx,10/01/2001,yyy,zzz
xxx,15/01/2001,yyy,zzz
to
xxx,01/01/2001,09/01/2001,yyy,zzz
xxx,10/01/2001,14/01/2001,yyy,zzz
xxx,15/01/2001,<today>,yyy,zzz
how do i go about transposing this data to a temp table or view ... i suspect it will be using cursors
ie go from
xxx,01/01/2001,yyy,zzz
xxx,10/01/2001,yyy,zzz
xxx,15/01/2001,yyy,zzz
to
xxx,01/01/2001,09/01/2001,yyy,zzz
xxx,10/01/2001,14/01/2001,yyy,zzz
xxx,15/01/2001,<today>,yyy,zzz