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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-11 : 08:21:04
|
| amar writes "hi,I want to show data for same day. I have column which stores date and time. however when i try thisselect vchr_name from tbl_employee where dte_time between '23/2/2005' and '23/2/2005NOthing is returned.. PLease can you help me?" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-11 : 08:31:40
|
| where convert(datetime,convert(varchar(8),dte_time,112)) between '20050223' and '20050223'or where datediff(dd,dte_time,'20050223') = 0orwhere dte_time >= '20050223' and dte_time < '20050224'==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-11 : 09:17:50
|
| To make use of index use nr's third queryMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|