List:General Discussion« Previous MessageNext Message »
From:Przemyslaw Popielarski Date:November 18 2004 12:40am
Subject:Re: IF() problem
View as plain text  
Jon Stephens <jon@stripped> wrote:
> *Any* string value evaluates as 0 (FALSE), not just the empty string.

Right. Didn't know that.
 
> You want "If BOOK1PL is not empty, return BOOK1PL, otherwise return
> BOOK1EN", correct?
> 
> Then try this instead:
> 
> SELECT IF(BOOK1PL <> '', BOOK1PL, BOOK1EN)
> FROM tBooksextra WHERE ksi = 'id';

Thanks, that is correct.

-- 
./ premax
./ premax@stripped
./ koniec i bomba, a kto czytal ten traba. w.g.    

Thread
IF() problemPrzemyslaw Popielarski17 Nov
Re: IF() problemJon Stephens17 Nov
  • Re: IF() problemPrzemyslaw Popielarski18 Nov
Re: IF() problemJon Stephens18 Nov