Re: lower() not working correctly...? - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: lower() not working correctly...?
Date
Msg-id 20060915084425.GC21235@a-kretschmer.de
Whole thread Raw
In response to lower() not working correctly...?  (Andreas Joseph Krogh <andreak@officenet.no>)
List pgsql-sql
am  Fri, dem 15.09.2006, um 10:06:40 +0200 mailte Andreas Joseph Krogh folgendes:
> I have the following query:
> 
> select lower(firstname) || ' ' || lower(lastname) from person
> 
> firstname and lastname are VARCHAR
> 
> lower() returns NULL when firstname OR lastname is NULL, is this correct?

Yes. You can user coalesce for this:

select coalesce(lower(firstname),'') || ...



HTH, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


pgsql-sql by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: lower() not working correctly...?
Next
From: Guillaume Lelarge
Date:
Subject: Re: lower() not working correctly...?