I recently tried using Coalesce() to check existence of a column name. SELECT DISTINCT COALESCE((SELECT 'AColumnThatDoesNotExist' FROM TD), -999) FROM TD; But, the SQL error code dominates? "no such column: AColumnThatDoesNotExist" Had to resort to: SELECT name FROM pragma_table_info('TD') WHERE name = 'AColumnThatDoesNotExist'; And oddly, pragma_table_info() fails below if the Table TD is unadorned? SELECT name FROM pragma_table_info(TD) WHERE name = 'AColumnThatDoesNotExist';
On Wed, Mar 11, 2020 at 2:20 PM Richard Hipp <d...@sqlite.org> wrote: > On 3/11/20, Hick Gunter <h...@scigames.at> wrote: > > While ORACLE does state that COALESCE will short circuit, > > A similar problem was reported on a ticket here: > https://www.sqlite.org/src/tktview?name=3c9eadd2a6 (The problem > reported on that ticket might not seem to be the same at first glance, > but deep down they are both the same issue.) > > I have a patch to fix the problem on a branch > (https://www.sqlite.org/src/timeline?r=do-not-factor-functions) which > you can experiment with. More changes and analysis are needed prior to > landing on trunk. I cannot guarantee that such a landing will in fact > occur, though it seems more likely than not at this point. > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users