Re: [sqlite] Unexpected/undocumented REPLACE() behavior

2019-06-10 Thread Shawn Wagner
With most functions, including replace(), if any of the arguments are null, it returns null. On Mon, Jun 10, 2019 at 4:29 PM Tony Papadimitriou wrote: > Example: > > --- CUT --- > create table t(s text); > insert into t values ('1'),('null'),('3'); > > .print 'BEFORE' > select rowid,* from t; >

[sqlite] Unexpected/undocumented REPLACE() behavior

2019-06-10 Thread Tony Papadimitriou
Example: --- CUT --- create table t(s text); insert into t values ('1'),('null'),('3'); .print 'BEFORE' select rowid,* from t; update t set s = replace(s,'null',null) --where s = 'null' --adding this works of course but that’s not my point ; .print 'AFTER' select rowid,* from t; --- CUT --- Th