Use of parentheses in an SQLSelect query 
Author Message
 Use of parentheses in an SQLSelect query

Hi (again),

I'd like to create an SQLQuery (for use with the built-in RBDatabase)
that is composed of multiple criteria. Something like:

select * from table where (name = "Daniel" OR name = "Peter") AND (date
= "2002-02-12")

Since the AND is evaluated first, I need the parentheses but they do not
seem to be supported (the above query will return an error message
stating it expects a table column name instead of the '('.

Is there a trick?


Daniel Tapie
Brussels, Belgium

Posted via Mailgate.ORG Server - http://www.*-*-*.com/

Tue, 10 Aug 2004 21:54:44 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Using parentheses in an SQL query

2. Problem using sqlselect with mysql database

3. Using sqlSelect with a variable?

4. less parentheses --> fewer parentheses

5. less parentheses --> fewer parentheses

6. Dangling Closing Parentheses vs. Stacked Closing Parentheses

7. MySQL query in PHP: Not query zero amounts also removes null amounts from query

8. Nil database cursor returned from SQLSelect

9. SQLSelect - Loading database/table field data into an Edit field

10. Using awk to do database queries

11. Using Query Wizard with a large database

12. Using Topspeed ODBC Driver with MS Query


Powered by phpBB® Forum Software