my SQL Select is not working for me?

A

Alpay Eno

Hi, not exactly sure where to post this... What could be
wrong with my SQL statement below? I've been pulling my
hair out over this one. the table is called "schedules"
and I need to collect data from columns "5a", "5b", "6a",
and "6b" but I'm trying to start off simple and its not
working. My syntax looks correct to me but looks
different in the error, I tried a repsponse.write and it
looked good there. this is using access btw. Thanks for
the help

sql = "SELECT * FROM schedule WHERE period='1' AND
5a='math'"

I get :
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query
expression 'period='1' AND 5a='math''.

tia. Alpay
 
A

Alpay Eno

all are text fields....

Hey, thanks a million, the brackets did it... got rid of
the syntax error anyway, now I see that my query doesn't
get to far with my tables. need to rethink my database
design (posted in that newsgroup), thanks for getting me
passed the hump though! much appreciated.

Alpay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top