spartan2010
Programmer
Hello Friends,
I have a small table TEST with Keys,Start date & End date .Here are three sample rows.
keys start date end date
1 2 3 4 5/10/2010 4PM 5/10/2010 4PM
1 2 3 4 5/11/2010 4PM 5/10/2010 4PM
1 2 3 4 5/12/2010 4PM 5/13/2010 4PM
The first two rows' end dates are wrong.The end date should be the same as start date of the next.They should be like the following
keys start date end date
1 2 3 4 5/10/2010 4PM 5/11/2010 4PM
1 2 3 4 5/11/2010 4PM 5/12/2010 4PM
1 2 3 4 5/12/2010 4PM 5/13/2010 4PM
How can I easily update the end dates with an UPDATE statement?
I have a small table TEST with Keys,Start date & End date .Here are three sample rows.
keys start date end date
1 2 3 4 5/10/2010 4PM 5/10/2010 4PM
1 2 3 4 5/11/2010 4PM 5/10/2010 4PM
1 2 3 4 5/12/2010 4PM 5/13/2010 4PM
The first two rows' end dates are wrong.The end date should be the same as start date of the next.They should be like the following
keys start date end date
1 2 3 4 5/10/2010 4PM 5/11/2010 4PM
1 2 3 4 5/11/2010 4PM 5/12/2010 4PM
1 2 3 4 5/12/2010 4PM 5/13/2010 4PM
How can I easily update the end dates with an UPDATE statement?