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 |
|
macca18
Starting Member
7 Posts |
Posted - 2006-05-11 : 09:31:22
|
| Hi,I have a table that includes two DateTime columns. The first column holds the date. e.g 2006/5/10 and the second column holds time e,g 08:15:25.I am having a problems specifing a query that will list the rows in the table between a date time range.i.e return all rows between 2006/5/8 09:00:00 and 2006/5/10 21:30:00Can anyone give me any suggesstions on how to do this?ThanksMacca |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-11 : 09:42:00
|
| I take it that you mean when displayed they hold20060510 00:00:00.000and19000101 08:15:25.000select *from tblwhere coldte + coltme bewtween '20060508 09:00:00' and '20060510 21:30:00'==========================================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:56:33
|
| Why did you use two columns to store date and time seperately?Hereafter, Use DateTime datatypeMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|