Easy Question.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access database which has one table called Employee. When I display
all the records of the table in a datagrid, everything is fine. However when
I put the WHERE clause for a a Join_Date field (which is Date/Time field) the
the records are not filtered as if there is no WHERE clause:

This is the sql statement I am using:

select fname, lname, Join_Date from employee where join_date > 1/1/2005

What wrong am I doing ?
 
Should be

select fname, lname, Join_Date from employee where join_date > #1/1/2005#


Note the # to indicate a date in MSAccess.



-- Alex
 
THank you


Alexander Lowe said:
Should be

select fname, lname, Join_Date from employee where join_date > #1/1/2005#


Note the # to indicate a date in MSAccess.



-- Alex
 
I believe one can also use standard ANSI SQL (as opposed to bastardized
Access SQL :->):

select fname, lname, Join_Date from employee where join_date > '1/1/2005'


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
It doesn't retrieve any row/record when I use this:
select fname, lname, Join_Date from employee where join_date > '1/1/2005'

However it does retrive relevant rows/records when I use this:
select fname, lname, Join_Date from employee where join_date > #1/1/2005#
 
Back
Top