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

    Join Date
    Jan 2013
    Posts
    78
    Rep Power
    0

    Select like only


    Hi,
    I am searching how to do selects similar as like but I want to select when the date in the rows is only one value.
    I explain,
    I have a column with rows like this:
    M, PB, GM, NA
    M, GM, NA
    M, NA
    M

    Then I want to search all rows that has only the value M,
    So I want these rows:
    M
    but I dont want these rows:
    M, NA
    or NA, M, PB or whatever

    Is this possible?
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,204
    Rep Power
    4279
    i think you're over-thinking it
    Code:
    SELECT ...
      FROM ...
     WHERE col = 'M'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    78
    Rep Power
    0
    Originally Posted by r937
    i think you're over-thinking it
    Code:
    SELECT ...
      FROM ...
     WHERE col = 'M'
    LOL, Yes I think so also,
    maybe due to I will also need
    where x like M, NA
    thanks, was to easy

IMN logo majestic logo threadwatch logo seochat tools logo