faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Database and SQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 6 people (33%) answered Yes
Recently 2 of 6 people (33%) answered Yes

Entry

How can I search the database by more than one field and value at the same time?

Feb 14th, 2002 03:18
Luiz Paulo Rosa, Allie Lingo,


You can try
Conn.Execute "SELECT * FROM tblData WHERE Field1='00' OR Field1='01' OR 
Field2='00' OR Field2='01'"
Or 
Conn.Execute "SELECT * FROM tblData WHERE (Field1='00' AND Field2='00') 
OR (Field1='01' AND Field2='01')"
I hope this can be helpful



© 1999-2004 Synop Pty Ltd