Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 'OR' within 'AND' statement

Author  Topic 

fastedge
Starting Member

8 Posts

Posted - 2002-05-29 : 10:53:07
I'm trying to create a query for Access with multiple conditions one of which needs to be compared to several fields.
I.E.

Select * from dB
Where a = a
and b = b
and ( c1 = c or c2 = c or c3 = c)
and ... so on.

How can I do this and not break the query at the first OR staement?


Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-05-29 : 14:39:51
what do you mean by "break the query"?

can you post the query that isn't working for you, as well as your table structure, some sample data and the desired resultset?

<O>
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-05-29 : 19:07:05
quote:

break the query



Do you mean how to build this query within the query builder - without resorting to the SQL editor?

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -