Below query is not working in ios 8.1 below version. Its give syntax error "With"
WITH RECURSIVE dates(category, points,diagonisePoints, date) AS (VALUES('Healthy Weight', '0','0', (select DATE(selectedDate, '+1 day') as selectedDate from glanceTable ORDER BY ROWID DESC LIMIT 1)),('Healthy Diet', '0','0',(select DATE(selectedDate, '+1 day') as selectedDate from glanceTable ORDER BY ROWID DESC LIMIT 1)),('Exercise', '0','0',(select DATE(selectedDate, '+1 day') as selectedDate from glanceTable ORDER BY ROWID DESC LIMIT 1)),('Smoking Cessation', '0','0',(select DATE(selectedDate, '+1 day') as selectedDate from glanceTable ORDER BY ROWID DESC LIMIT 1)) UNION ALL SELECT category, points,diagonisePoints, date(date, '+1 day') FROM dates WHERE date < date('now')) insert into glanceTable SELECT category, points,diagonisePoints, date as selectDate FROM dates WHERE date <= date('now')
Same query is working iOS 8.2 above.
Since there is no recursive method in iOS 8.1 supported, sqlite will be at version 3.7.13.
Sqlite3 version are automatically changed based on iOS version changes
So is there any alternative way i need to get my query work in below version?
Your feedback is highly appreicated.