View Full Version : Really basic sql question


James.90
12-04-2007, 03:00 PM
Hey. This is a really basic question but i've looked through a few tutorials and couldn't find an answer

If i have this statement

SELECT * FROM timesheet
WHERE Weekending='07/12/07' FNAME='James.90';


How do i filter it with 2 parameters

such as the Weekending and the FNAME. When i run it, it gives me the following error

Syntax Error (missing operator) in query expression Weekending="07/12/07" FNAME="James.90".

Thanks

KeithG
12-04-2007, 03:05 PM
You need to surround you date value in # signs

#Date#

James.90
12-04-2007, 03:08 PM
Didn't work

The field type though is text not date even though there is a date in the field and i am running it in Microsoft Access 2007

Edit:Got it working

Added an AND inbetween the criteria

boblarson
12-04-2007, 03:14 PM
Have you tried using the word AND?

WHERE Weekending='07/12/07' AND FNAME='James.90';

James.90
12-04-2007, 03:24 PM
Yep i got it working a few minutes ago

Thanks for all the advice though :)