Finding an empty field

Started by Nonamealmost 27 years ago2 messagesgeneral
Jump to latest
#1Noname
ghoffman@ucsd.edu

I'm having trouble finding empty fields so that I can fill them.

This type of query seems to yield no returned rows:

SELECT * FROM TABLE WHERE FIELD1 IS '';
or
UPDATE TABLE SET FIELD1 = 'SOMETHING' WHERE FIELD1 IS '';

I've also fooled around with EMPTY and NOT EXISTS, but I can't get it
right.

What do you recommend to find empty fields?

Thanks,
Gary

**************************************************************************
* Gary B. Hoffman, Computing Services Manager e-mail: ghoffman@ucsd.edu *
* Graduate School of International Relations and Pacific Studies (IR/PS) *
* University of California, San Diego (UCSD) voice: (619) 534-1989 *
* 9500 Gilman Dr., La Jolla, CA 92093-0519 USA fax: (619) 534-3939 *
**************************************************************************

#2Michael J Davis
michael.j.davis@tvguide.com
In reply to: Noname (#1)
RE: [GENERAL] Finding an empty field

SELECT * FROM TABLE WHERE FIELD1 = ''; or
SELECT * FROM TABLE WHERE FIELD1 IS NULL;

Show quoted text

-----Original Message-----
From: ghoffman@ucsd.edu [SMTP:ghoffman@ucsd.edu]
Sent: Tuesday, July 06, 1999 2:50 PM
To: pgsql-general@postgreSQL.org
Subject: [GENERAL] Finding an empty field

I'm having trouble finding empty fields so that I can fill them.

This type of query seems to yield no returned rows:

SELECT * FROM TABLE WHERE FIELD1 IS '';
or
UPDATE TABLE SET FIELD1 = 'SOMETHING' WHERE FIELD1 IS '';

I've also fooled around with EMPTY and NOT EXISTS, but I can't get it
right.

What do you recommend to find empty fields?

Thanks,
Gary

**************************************************************************
* Gary B. Hoffman, Computing Services Manager e-mail: ghoffman@ucsd.edu *
* Graduate School of International Relations and Pacific Studies (IR/PS) *
* University of California, San Diego (UCSD) voice: (619) 534-1989 *
* 9500 Gilman Dr., La Jolla, CA 92093-0519 USA fax: (619) 534-3939 *
**************************************************************************