| From: | Michael Kleiser <mkl(at)webde-ag(dot)de> |
|---|---|
| To: | mike <mike(at)redtux1(dot)uklinux(dot)net> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: When is a blank not a null or '' |
| Date: | 2005-02-02 11:19:39 |
| Message-ID: | 4200B74B.4090900@webde-ag.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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(at)postgresql(dot)org
>
>
Are NULL in work_email possible ?
If yes you should you have to use.
SELECT first_name,work_email FROM tb_contacts WHERE
tb_contacts.work_email <>''
AND
tb_contacts.work_email IS NOT NULL;
By the was in Oracle there is no difference between empty
CHAR- or VARCHAR-column and NULL- CHAR or VARCHAR-columns.
But that is scpecial to Oracle.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | mike | 2005-02-02 11:20:03 | Re: When is a blank not a null or '' |
| Previous Message | Chris Green | 2005-02-02 11:18:44 | Re: When is a blank not a null or '' |