what do i have to do if i want to add another string after F1 if F2 is not null e.g. ' ,' ?
thx

----- Original Message ----- From: "Igor Tandetnik" <[EMAIL PROTECTED]>
To: "SQLite" <sqlite-users@sqlite.org>
Sent: Friday, November 24, 2006 6:58 PM
Subject: [sqlite] Re: combination of fields with || ?


Daniel Schumann <[EMAIL PROTECTED]> wrote:
i try to combine two fields in a query like:  SELECT id, F1||F2 AS
FNew, F3 ... when both fields F1 and F2 got data everything is ok but
if one of the fields is empty, the whole field FNew is empty :-(

I bet the fields are not empty strings, but NULLs. Try

ifnull(F1, '') || ifnull(F2, '')

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to