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 |
|
d0153030
Starting Member
8 Posts |
Posted - 2004-11-08 : 02:03:16
|
| HelloWhat shuld be the query for:1.0 sorting id from the table filtered by the range of the dates?i.e. Select id FROM TableName WHERE date is in between DT1 and DT2My date filed in the database is smalldatetime, I am using in the VB form two DTPicker. I just want to get the Dates from both DTPicker and to put in the queryHow to do this?Next if i want to get data from the table with particular date record.D0153030Leave Your Marke Wherever You Go |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2004-11-09 : 14:54:21
|
| Are you using another language on the front-end of your program?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
samamun001
Starting Member
17 Posts |
Posted - 2004-11-09 : 23:10:45
|
| This thing should workselect EmployeeID from Employees where JoinDate between '11/01/2004' and '11/02/2004' Dt1 Dt2 |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-11-10 : 00:36:40
|
quote: Originally posted by d0153030 HelloWhat shuld be the query for:1.0 sorting id from the table filtered by the range of the dates?i.e. Select id FROM TableName WHERE date is in between DT1 and DT2My date filed in the database is smalldatetime, I am using in the VB form two DTPicker. I just want to get the Dates from both DTPicker and to put in the queryHow to do this?Next if i want to get data from the table with particular date record.D0153030Leave Your Marke Wherever You Go
do you know how to get the data from datepicker? if it's vb then it's datepicker1.text or value (i think).your query should look like this:"select id from tablename where dateField between '" & datepicker1.value & "' and '" & datepicker2.value & "'"you can use = operator for particular date record--------------------keeping it simple... |
 |
|
|
|
|
|