I am trying to run a query:
SELECT name FROM Foo WHERE instr(name, '@') = 0 AND instr(name, '.') != 0
But I am getting the error: "no such function: instr". This confuses me because the website clearly states that the function exists. Anyone know what is going on?
P.S. I also tried the query in SQLiteSpy which gives the same error.
According to the Change History, the instr
function was added in version 3.7.15:
2012-12-12 (3.7.15)
Added the instr() SQL function.
Make sure you're running the latest release.
If upgrading is not an option, you can also use the LIKE
operator:
SELECT name
FROM Foo
WHERE name NOT LIKE '%@%' -- name does NOT contain @
AND name LIKE '%.%'; -- name DOES contain .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With