Marcel Wesołowski wrote: > In SQLite when strings are concatenated (with ||) and one of them is null, > the result will be null. > This is not a required behaviour
It *is* required by all SQL standards. > (not intuitive) It's intuitive for everybody with experience with SQL. That is how _all_ operations on NULL values behave. > and most users tend to add *ifnull(X, '')* to get proper results. > This slows down the whole operation, when we have lots of records in the > database. Then why don't they store empty strings in the first place? > Would it be hard to add both: compile time option (in C source) and pragma > function to make concat yeld different results? It would be hard to document the interactions between all these settings, and to handle all the complaints when it isn't set as one would expect. > In MS database there is *CONCAT_NULL_YIELDS_NULL* setting which does exacly > what it states. <http://msdn.microsoft.com/en-us/library/ms176056.aspx> says: | *Important* | In a future version of SQL Server CONCAT_NULL_YIELDS_NULL will always | be ON and any applications that explicitly set the option to OFF will | generate an error. Avoid using this feature in new development work, | and plan to modify applications that currently use this feature. > Why there's no such functionality in SQLite? Because it's not called SQLFat. Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

