I keep getting this error for my sqlite if-condition query below,
SELECT *
FROM speckdata AS s
LEFT JOIN weatherunderground AS w
ON s.wid_timestamp = w.wid_timestamp
LEFT JOIN nodes AS n
ON n.nid = s.nid
AND n.datatype = 'speck'
WHERE DATE(localdate) BETWEEN '2014-10-09' AND '2015-05-12'
AND n.nid = '9'
CASE WHEN 'polar plot' != NULL THEN w.wspdi != '-9999' ELSE w.wspdi != NULL END
Error,
near "CASE": syntax error ] Exception Name: NS_ERROR_FAILURE Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]
Any ideas?
Aucun commentaire:
Enregistrer un commentaire