Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2006
    Posts
    57

    Unanswered: finding null results

    If I have a query such as
    Code:
    SELECT * FROM TABLE WHERE PARENT = NULL
    where a run a query like this one it returns zero results. I am not sure why. How can I look in a column for empty or null results?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    WHERE PARENT IS NULL
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2006
    Posts
    57
    wow...r937 you know alot about database programming why are you not rich or something? I see you have the capability to create some nice web software. Have you ever tried creating software and sail it? I am sure you would become rich!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    sail it? you mean, sell it?

    knowing basic sql syntax is not really something one can get rich on

    besides, there are lots of things in life better than chasing money

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

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    Quote Originally Posted by r937
    besides, there are lots of things in life better than chasing money
    Hear hear! Zustimmung!

  6. #6
    Join Date
    Feb 2003
    Location
    India
    Posts
    216
    just to inform u, u can still have your sql working if u issue this before

    set ANSI_NULLS off

    .... why are you not rich or something.....
    how do u know that rudy isn't?

    also please don't advice me to "Sail off" or "Shell in" or "Sale all" for this humble post.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i assure you, i am not rich in monetary terms, not at all, not even remotely close

    i have other things to warm my heart

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

  8. #8
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by r937
    knowing basic sql syntax is not really something one can get rich on
    oh my God I have waisted the prime of my life. the parents were right, i should have gone to law school.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  9. #9
    Join Date
    Oct 2006
    Posts
    115
    quite a funny post, TS is saying somebody is not rich because he/she is able to type the right syntax......duh....

  10. #10
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Quote Originally Posted by Thrasymachus
    oh my God I have waisted the prime of my life.
    Does that mean you've spent the prime of your life becoming overweight?
    Inspiration Through Fermentation

  11. #11
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    oh gee, you caught me with my illiteracy down.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

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