FYI - This is a forum for LibreOffice which is in many ways different than OpenOffice. However Base is similar. Original question corrected.
SQL date calculations are different depending upon the DB and its’ version. LibreOffice comes with HSQLDB embedded v1.8 - documentation here. Your SQL is not truly looking for ‘older than 70 years’ since it only considers the year in the selection. With that said, just based upon your statement this will work:
SELECT * FROM "tblPeople" WHERE (TO_CHAR( TODAY, 'YYYY' ) - YEAR("birth")) > 70
For the second part of the question, use IS NULL
and IS NOT NULL
for checking empty fields.
If this answers your question please click on the (upper left area of answer).