Re: [sqlite] SQLite NULL or 0-Length

2013-05-23 Thread Marc L. Allen
To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite NULL or 0-Length Simon, Is there a danger here if firstname is NULL and the LENGTH() function is called first? RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org

Re: [sqlite] SQLite NULL or 0-Length

2013-05-23 Thread Rob Richardson
of SQLite Database Subject: Re: [sqlite] SQLite NULL or 0-Length On 23 May 2013, at 7:06pm, Jill Rabinowitz wrote: > Does anyone know how I can check the column and set it to a value if > it has nothing in it? UPDATE myTable SET firstname='xxx' WHERE LENGTH(firstname) = 0 OR fi

Re: [sqlite] SQLite NULL or 0-Length

2013-05-23 Thread Simon Slavin
On 23 May 2013, at 7:06pm, Jill Rabinowitz wrote: > Does anyone know how I can check the column and set it to a value if it has > nothing in it? UPDATE myTable SET firstname='xxx' WHERE LENGTH(firstname) = 0 OR firstname IS NULL Simon. ___ sqlite-us

Re: [sqlite] SQLite NULL or 0-Length

2013-05-23 Thread Richard Hipp
On Thu, May 23, 2013 at 2:06 PM, Jill Rabinowitz wrote: > Hello, > > I am having trouble with a SQLite IFNULL and replace statements. I am > trying to put a value into a column that has no value / has a zero length. >I am wondering whether anyone can shed light on this. > > I'm trying to set

[sqlite] SQLite NULL or 0-Length

2013-05-23 Thread Jill Rabinowitz
Hello, I am having trouble with a SQLite IFNULL and replace statements. I am trying to put a value into a column that has no value / has a zero length. I am wondering whether anyone can shed light on this. I'm trying to set column firstname to 'xxx' if the column has a NULL value (or has len