>>I find however that I frequently seem to need to cast these columns as integer in order for maths to work correctly. >There is no difference between a NUMERIC value which is an integer and an INTEGER value which is an INTEGER -- they are both INTEGER and behave exactly the same. Checking through my SQL scripts I find virtually all of the CAST functions are for a single column, which for historical reasons contains an integer value or an empty string. This database comes from a Dataflex application of the 1980s, which because I don't want to rewrite in something more modern is still in use today. The SQLite database is used for our web site, and ad-hoc reporting, and is refreshed after the Dataflex DB is updated. The issue is with comparisons like this: select ... where field>=50 where the condition evaluates to true when the field is empty. It should, of course, be null but I am not certain what affect that change might have in other places. Yes, I am a dinosaur. Both a Dataflex and Ingres RDBMS user.