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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL commands for selected date

Author  Topic 

Varsha Patil
Starting Member

3 Posts

Posted - 2008-05-09 : 01:38:29
I want to display the data in a datasheetview in ms access project.
The data is between particular date. What command should i used for this?

My form contailn feilds : UserId,FromDate,ToDate

Enter the userid & Particular date & after click on submit data for that period should display in datasheet view.

Please help me in this as soon as possible.

amirs
Constraint Violating Yak Guru

260 Posts

Posted - 2008-05-09 : 02:00:45
select * from tablename
where fromdate between particular date and particular date and
userid=your text field value
Go to Top of Page

eralper
Yak Posting Veteran

66 Posts

Posted - 2008-05-09 : 02:54:18
Hello, this might be an alternative also


select * from tablename
where @Date between FromDate and ToDate
and userid = @UserId

Eralper
http://www.kodyaz.com/content/SQLServerArticles.aspx



-------------
Eralper
http://www.kodyaz.com
Go to Top of Page
   

- Advertisement -