Re: When is a blank not a null or '' - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: When is a blank not a null or ''
Date
Msg-id 20050202115757.GB18657@svana.org
Whole thread Raw
In response to When is a blank not a null or ''  (mike <mike@redtux1.uklinux.net>)
List pgsql-general
Try:

SELECT first_name,'['||work_email||']' FROM tb_contacts  WHERE
tb_contacts.work_email <>'';

Maybe you have spaces?

On Wed, Feb 02, 2005 at 09:59:30AM +0000, mike wrote:
> I have the following query (I have removed all nulls from the field as
> test)
>
> SELECT first_name,work_email FROM tb_contacts  WHERE
> tb_contacts.work_email <>'';
>
> However I get loads of blank email addresses coming up
>
> anyone any ideas
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Chris Green
Date:
Subject: Re: When is a blank not a null or ''
Next
From: Csaba Nagy
Date:
Subject: Re: When is a blank not a null or ''