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 |
|
asif372
Posting Yak Master
100 Posts |
Posted - 2011-03-07 : 23:41:16
|
| i have a datetime column Like thisDate Shift10/18/2010 2:39:08 PM (A)10/24/2010 10:11:53 PM (A)i want to update shift between these two values search by date how can we do this |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2011-03-08 : 00:18:54
|
quote: Originally posted by asif372 i want to update shift between these two values search by date how can we do this
Can you provide more detailed information along with some sample data and expected output. |
 |
|
|
asif372
Posting Yak Master
100 Posts |
Posted - 2011-03-08 : 01:50:21
|
| have a datetime column Like this{ID}{Date} {Shift}{1}10/16/2010 2:39:08 PM (A){1}10/117/2010 2:39:08 PM (A){1}10/18/2010 2:39:08 PM (A){1}10/19/2010 10:11:53 PM (A){1}10/20/2010 10:11:53 PM (A){1}10/21/2010 10:11:53 PM (A){1}10/22/2010 10:11:53 PM (A){1}10/23/2010 10:11:53 PM (A){1}10/24/2010 10:11:53 PM (A){1}10/25/2010 10:11:53 PM (A){1}10/26/2010 10:11:53 PM (A){1}10/27/2010 10:11:53 PM (A)i want to update shift between 10/18/2010 and 10/24/2010 these two values search by date how can we do thisoutput shuld be like this{1}10/18/2010 2:39:08 PM (R){1}10/19/2010 10:11:53 PM (R){1}10/20/2010 10:11:53 PM (R){1}10/21/2010 10:11:53 PM (R){1}10/22/2010 10:11:53 PM (R){1}10/23/2010 10:11:53 PM (R){1}10/24/2010 10:11:53 PM (R)any idea???thanks in advance |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-03-08 : 02:18:36
|
[code]update tset shift = 'R'from yourtable twhere Date >= '2010-10-18'and Date < '2010-10-25'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|