Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
phoenix22
Starting Member
20 Posts |
Posted - 2005-12-14 : 22:30:37
|
| I have a DATE_VALUE table that lists dates for a year. I need to update this table with period_start and period_end dates for 2 week periods for one year.For example, for all records with dates between July 1 to July 14, the period_start and period_end dates will be July 1 and July 14. For records between July 15 and July 29, the period_start and period_end will be July 15 and July 29. How would I be able to do this?Thanks in advance. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2005-12-14 : 22:47:01
|
| Can you post your table structure, sample data and expected result ?-----------------[KH]Learn something new everyday |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-15 : 00:54:08
|
| Try thisUpdate yourTable set period_start ='20040701',period_end='20050714' where datecol between '20050701' and '20050714' You may need to change the year according to your requirementMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|