Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    2

    Unanswered: select statement help

    hi,

    im pretty new to all this, so any help is greatly appreciated.

    on a select statement how do say

    select *
    from blah
    where either of two fields could = 'Nick'

    I hope that makes sense!

    Thanks

  2. #2
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    ??

    did not know excatly what you want?

    SELECT * FROM bla WHERE field1='Nick' OR field2='Nick';

    is this what you want?
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

  3. #3
    Join Date
    Jun 2004
    Posts
    2
    yes.

    its a search box on my intranet site. it needs to search two fields but with only one box.

    so if you search for 'nick' i want it to search both the firstname and surname fields. The only thing is, with the web software im using, the box on the intranet is given a name which relates to the select statement.

    so im guessing the select statement to be

    select *
    from table
    where (the two fields have to be joined i think, with a name to relate to the box)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •