Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Posts
    165

    Unanswered: Querying for null values in a table...

    We have this database at my job and we're currently trying to solve the problem of "bad data in equals bad data out." In some of our tables, we have fields with null values. We're going to replace these null fields with data so we do not have this problem again. What's the criteria for searching for a null field? I've tried several things and I can't figure it out. All I want to do is search for the null fields and then fill those fields in. Thanks for any help!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select * from yourtable where somecolumn is null
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2005
    Posts
    165
    I dont' quite understand. I'm just searching individual tables for null fields right now using the design view function in access. I don't know SQL all the well. Thanks

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    ah, i see

    okay, i'm not totally certain i can walk you through how to do it in design view, so how about trying the following

    1. open SQL view and delete anything that's there (SELECT; )
    2. paste the sql i gave you
    3. change "yourtable" to the actual name of your table
    4. change "somecolumn" to the actual name of the column you want to search
    5. switch to design view

    tada!!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2005
    Posts
    165
    Thanks!! it worked like a charm!!

Posting Permissions

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