Results 1 to 3 of 3
  1. #1
    sandlucky is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    35

    Question SQL wildcard character excluding

    pls help

    How exclude character from SQL wildcard query.

    My Query> (I need to select Flowers doesnt contain color "H")

    SELECT Genus, Species, Flowercolor
    FROM Main
    WHERE FlowerColor Like "[!H]*";

    H can be exist in any order, It can be 1st character , 2nd, 5th or last. It doest really matter flower contains any other color (A-N). All i need to do is SELECT Genus, species and Flowecolor of Flowers which doesnt contain clor "H". Meaning of A-N color abbriviate are like this;

    Red (A)


    Orange (B)
    Yellow (C)
    Green (E)
    Blue (G)
    Violet (H)
    Pink (I)
    White (J)
    Creamy (K)
    Black (L)
    Gray (M)
    Brown (N)

    pls help!

  2. #2
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    You really shouldnt post the same query 2 times, even with a slightly different question...

    use 'not like'

    Where FlowerColour not like '*H*'; or i think you can use the not equal to signs

  3. #3
    sandlucky is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    35
    It's not same but quite similar.
    Thanx useful 4 reply.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DateDiff Excluding Weekends
    By cs93 in forum Programming
    Replies: 1
    Last Post: 03-25-2011, 04:09 PM
  2. Wildcard Expressions in Search Field
    By eww in forum Programming
    Replies: 4
    Last Post: 09-29-2010, 10:27 AM
  3. Weekday excluding weekends
    By jd316632 in forum Queries
    Replies: 3
    Last Post: 05-24-2010, 02:01 PM
  4. Parameter Query & Wildcard
    By Rick West in forum Queries
    Replies: 8
    Last Post: 12-29-2009, 10:54 AM
  5. Excluding data in a query
    By lpdds in forum Queries
    Replies: 1
    Last Post: 12-16-2009, 08:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums