PDA

View Full Version : where clause help


needhelp26
09-15-2004, 03:10 AM
What is the correct syntax to include multiple fields in the where clause?

For example:



Select * from mytable where field1 = '" & field1 &"', field2 = '" & field2 & "' and field3 = '" & field3 & "' Order by id "



The above code isn't working.

A1ien51
09-15-2004, 03:59 AM
WHERE A = 'x' AND B = 'x' AND C = 'X'

You should buy SAMS TEACH YOURSELF SQL IN 10 MINUTES (it is cheap and will teach you alot)

Eric

BuddhaMan
09-15-2004, 04:31 AM
Hitting the links in the five colored boxes on these pages will save you that $10. :)

WHERE clause: http://www.devguru.com/Technologies/jetsql/quickref/where.html

JetSQL Commands: http://www.devguru.com/Technologies/jetsql/quickref/jet_sql_list.html

A1ien51
09-15-2004, 02:55 PM
I am a book man, I know I can reach on my shelf and it will be there. Helps that I get most of my books for free! (I paid for that SQL book!)

Eric

needhelp26
09-15-2004, 03:05 PM
Thankyou all.