Checking if a SQLite float is null?

Discussion in 'iPhone/iPad Programming' started by Buschmaster, Jan 20, 2009.

  1. macrumors 65816

    Buschmaster

    Joined:
    Feb 12, 2006
    Location:
    Minnesota
    #1
    There are two routes I could take here... Set the default value to some random float that I know will never be used or figure out how to actually figure out a null value.


    I am grabbing information from my SQLite DB and it has several fields, almost all of which can be null. If it's not null, I don't put anything into the NSDictionary I'm creating for it, but as of right now I have no idea how to figure that out... I'm struggling with this, why can't it be as easy as PHP is? ;)

    Any help is much appreciated!
     
  2. macrumors newbie

    Joined:
    Dec 17, 2007
    #2
    Use ISNULL

    select * from mytable where myfloat ISNULL
     

Share This Page