RE: [firebird-support] Evaluate "empty" string

2017-08-17 Thread 'bogdan mordicom' bog...@mordicom.si [firebird-support]
too complicated, less readable and i guess consuming more Bogdan From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: Thursday, August 17, 2017 9:17 AM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Evaluate "empty&qu

Re: [firebird-support] Evaluate "empty" string

2017-08-17 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
>If (coalesce(terminal, '') <> '') then No need for coalesce since is an unknown state and compared with a value it neither returns true nor false. Hence, I suspect if (trim(terminal) > '') to be equivalent to if (((CHAR_LENGTH(trim(terminal))>0) and (terminal is not null)) Set

RE: [firebird-support] Evaluate "empty" string

2017-08-16 Thread 'bogdan mordicom' bog...@mordicom.si [firebird-support]
This is also possible If (coalesce(terminal, '') <> '') then Regards Bogdan From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: Wednesday, August 16, 2017 6:39 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Ev

Re: [firebird-support] Evaluate "empty" string

2017-08-16 Thread Jorge Andres Brugger jorge.brug...@gmail.com [firebird-support]
That's right! I was focusing in the wrong place! So stupid me! Thanks a lot (also to Michel). 2017-08-16 13:20 GMT-03:00 Mark Rotteveel m...@lawinegevaar.nl [firebird-support] : > On 16-8-2017 17:53, Jorge Andres Brugger jorge.brug...@gmail.com >

Re: [firebird-support] Evaluate "empty" string

2017-08-16 Thread Michel LE CLEZIO mlcvi...@yahoo.fr [firebird-support]
May be this : if (terminal<>'') and ( not  (terminal is null)) thendo something With best regardsMichel Le Mercredi 16 août 2017 18h20, "Mark Rotteveel m...@lawinegevaar.nl [firebird-support]" a écrit :   On 16-8-2017 17:53, Jorge Andres Brugger

Re: [firebird-support] Evaluate "empty" string

2017-08-16 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 16-8-2017 17:53, Jorge Andres Brugger jorge.brug...@gmail.com [firebird-support] wrote: > Hello all. > I need to evaluate if one SP varchar parameter is "not empty". I´m using: > if (((CHAR_LENGTH(trim(terminal))>0) or (terminal is not null)) then something>. > If I send '' (empty string) as

[firebird-support] Evaluate "empty" string

2017-08-16 Thread Jorge Andres Brugger jorge.brug...@gmail.com [firebird-support]
Hello all. I need to evaluate if one SP varchar parameter is "not empty". I´m using: if (((CHAR_LENGTH(trim(terminal))>0) or (terminal is not null)) then . If I send '' (empty string) as parameter content, the expression evaluates to true (I´m expecting to get a false). What am I doing wrong?