Thread: Associativity

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    47
    Rep Power
    12

    Associativity


    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.

    Cheers
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    373
    Rep Power
    12
    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

IMN logo majestic logo threadwatch logo seochat tools logo