Results 1 to 2 of 2

Thread: sql query

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default sql query

    is it possible to query a column that has some value? in other words if the value is blank then dont choose
    Code:
    SELECT * FROM tableName WHERE descript1 NOT LIKE ' ';
    so i want to choose all items from descript1 that have some sort of value

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Code:
    SELECT * FROM tableName WHERE descript1 IS NOT NULL AND descript1 != ''
    Should do the trick.

  3. The Following User Says Thank You to Schmoopy For This Useful Post:

    ggalan (10-26-2010)

Bookmarks

Posting Permissions

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