August 25th, 2003, 11:48 PM
How would I write this in SQL
field1=val AND (field2=val OR field3=val OR field4=val)
The values can be anything they are not the same.
I need to have the OR's grouped together.
August 26th, 2003, 11:20 AM
you should explain what you mean a bit more, it's kind of unclear.
what you've written is a valid SQL fragment, but not an entire query. you need to add SELECT, FROM, and WHERE parts, the stuff you've put there would go under restrictions listed in the WHERE clause of the query