Author |
Topic |
rama.nelluru
Starting Member
37 Posts |
Posted - 2011-10-27 : 21:33:40
|
Hi ,I need to write a script that updates the date columns.My requirement is I have date column Col name-----Datecol 01-10-2010 01-17-2010 01-24-2010.......with a week diffrnceI need to update 01-10-2010 with the 04-06-2010 01-10-2010 with the 04-13-2010( a week diffrence hear)so finally the first date(01-10-2010) must be update with 04-06-2010...a week diffrnce in both the dates....I need to channge like 12 weeks like that.Please help me on this....RAM |
|
X002548
Not Just a Number
15586 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
rama.nelluru
Starting Member
37 Posts |
Posted - 2011-10-28 : 08:36:52
|
I have table with column name datecol data ------- 01-10-2010 01-17-2010 01-24-2010and in other table or same table i have datecolumn with data 04-10-2012 04-17-2012 04-24-2012I want update if 01-10-2010 was the date i need to update with 04-10-2012 if 01-17-2010 was the date i need to update with 04-10-2012like that i need to update foe 10 continous weeks. Please some one can help me to write a script that updates the date with 1 week diffrence in the tables column.RAM |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-28 : 08:42:34
|
one question. how do you determine which date in your first table needs to replaced by which date in other table? do you have a common field with which you can relate them?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
X002548
Not Just a Number
15586 Posts |
|
rama.nelluru
Starting Member
37 Posts |
Posted - 2011-10-28 : 11:46:37
|
common field is weekid. How do I update the teh date. Please any someone can help me out the scriptRAM |
|
|
X002548
Not Just a Number
15586 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-28 : 12:27:03
|
quote: Originally posted by rama.nelluru common field is weekid. How do I update the teh date. Please any someone can help me out the scriptRAM
can we see what update query you tried and what was issue you faced with it?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|