0

How can I use regex with if-condition in sqlite? My query below,

....
WHERE DATE(localdate) BETWEEN '2014-10-09' AND '2015-05-12'
AND n.nid = '9'

AND CASE WHEN '9' REGEXP '^[0-9]+$' THEN w.wspdi != '-9999' ELSE w.wspdi != NULL END

error,

no such function: REGEXP

Any ideas?

Run
  • 54,938
  • 169
  • 450
  • 748
  • 1
    You might want to look at this question: http://stackoverflow.com/questions/5071601/how-do-i-use-regex-in-a-sqlite-query – nhahtdh May 20 '15 at 06:53
  • 1
    take a look at the following answer: http://stackoverflow.com/a/8338515/129283 – macf00bar May 20 '15 at 06:56

0 Answers0