On 2018/11/30 12:50 PM, Eric Grange wrote:
Apparently adding just a "WHERE 1" clause is enough...
Indeed, glad it works.
PS: I used "wcount" rather because "count" is an internal SQL function.
Indeed, though it seems to be accepted here, I am not using a field with my
name in may actual code.
I only used it because that was in the example I copy-pasted from the SQL
doc, I guess the doc could
be updated (it's in https://sqlite.org/lang_UPSERT.html)
Apologies, I wasn't judging your use of it (or the documentation's),
just explaining why my example deviated from yours in that regard.
They can and do definitely work in many cases, such as the above, and
even when they don't work, simply enclosing in double-quotes will fix
it. Some people's answer to this is to always use the quotes, my
approach is to avoid reserved words/functions out of principle - a
practice I'm prepared to admit is probably the worse of the choices,
because a word might become reserved over some years of development
[think WITH, UNLIKELY, DO, etc.] which may render older SQL using any
of those: "unsafe", whereas double-quoting is future-proof.
But what can I say? I live dangerously!
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users