Hi,
I write basic queries (using tables and nested queries) but this is not enough for my current problem.
I have a table that looks like:
current table
emp payroll eff_date strp rate
2 VIHA 20030910 9 35.31
2 VIHA 20060401 9 36.37
2 VIHA 20070401 9 37.64
2 VIHA 20080401 9 38.58
2 VIHA 20090403 9 40.2
2 VIHA 20100402 9 41.41
2 VIHA 20110401 9 42.65
but I need an end date so i can use this table in other areas:
transformed to :
emp payroll eff_date end_date strp rate
2 VIHA 20030910 20060331 9 35.31
2 VIHA 20060401 20070331 9 36.37
2 VIHA 20070401 20080331 9 37.64
2 VIHA 20080401 20090402 9 38.58
2 VIHA 20090403 20100401 9 40.2
2 VIHA 20100402 20110331 9 41.41
2 VIHA 20110401 9 42.65
basically use the effective_date from the next record , subtract 1 day and use this as the end date.
any suggestions?
Thanks in advance
I write basic queries (using tables and nested queries) but this is not enough for my current problem.
I have a table that looks like:
current table
emp payroll eff_date strp rate
2 VIHA 20030910 9 35.31
2 VIHA 20060401 9 36.37
2 VIHA 20070401 9 37.64
2 VIHA 20080401 9 38.58
2 VIHA 20090403 9 40.2
2 VIHA 20100402 9 41.41
2 VIHA 20110401 9 42.65
but I need an end date so i can use this table in other areas:
transformed to :
emp payroll eff_date end_date strp rate
2 VIHA 20030910 20060331 9 35.31
2 VIHA 20060401 20070331 9 36.37
2 VIHA 20070401 20080331 9 37.64
2 VIHA 20080401 20090402 9 38.58
2 VIHA 20090403 20100401 9 40.2
2 VIHA 20100402 20110331 9 41.41
2 VIHA 20110401 9 42.65
basically use the effective_date from the next record , subtract 1 day and use this as the end date.
any suggestions?
Thanks in advance