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
 Other Forums
 MS Access
 problem with Between Operator

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2006-11-13 : 04:16:25
my table:
Studentid date status
101 11/08/2006 A
101 11/09/2006 A
101 11/10/2006 P
101 11/11/2006 P

my query:
select status from mytable where studentid = '101' and date between '11/08/2006' and '11/11/2006'

i want to return this 2p's and 2A's to another function by this query, but its giving status at 11/08/2006, staus at 11/11/2006.
i am using MsAccess.
can u show me a solution?
thanx in advance,
rammohan


One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-13 : 04:30:57
Try this:

select status from mytable
where studentid = '101' and date between #11/08/2006# and #11/11/2006#


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

rammohan
Posting Yak Master

212 Posts

Posted - 2006-11-13 : 05:17:27
Thanks you it is working now...

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-13 : 06:55:31
In Access when passing dates you should use # in place of '

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -