Checking if a SQLite float is null?

Discussion in 'iOS Programming' started by Buschmaster, Jan 20, 2009.

  1. Buschmaster macrumors 65816


    Feb 12, 2006
    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. HardyMacia macrumors newbie

    Dec 17, 2007
    Use ISNULL

    select * from mytable where myfloat ISNULL

Share This Page