On 18 Nov 2019, at 10:00pm, Jose Isaias Cabrera <jic...@outlook.com> wrote:
> Thanks Keith. So, you are saying that this is a bad INSERT, and I don't know > much to argue, but is working. If I take out the first IfNull, and there is > not, at least one instance of 'p006' in the table, the INSERT never works. I > was thinking of using COALESCE, but that would also mean that one or the > other would have to be not null. Any suggestion would be appreciated. Being completely serious, whenever I see "undocumented" or "implementation dependent" or "optimization side-effect", or a SQL statement I can't parse in my head, I usually decide to do it in my programming language instead. This simplifies testing and debugging, and makes things easier for the poor engineer who has to understand my code. You can do clever things in a language like SQL which allows recursive construction clauses. But what strikes me as ingenious when I'm writing it can look bizarre and impenetrable to me, or someone else, a year later. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users