Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql --> query for empty column
If the column has null,
WHERE column = NULL won't get you the result.
You want to try
WHERE column IS NULL
Good luck,
CM
In article <352ec97a.726641765_at_news.istar.ca>,
rprendin_at_magi.com (Robert Prendin) wrote:
>
> Perhaps the field you think has nothing in it actually contains
> spaces...
>
> try the following:
> select
> decode(substr(column_name,1,1),' ','space!!') from table_name;
>
> good luck
>
> Robert Prendin
> crd_at_cs.odu.edu (CRAIG READ DUNCAN) wrote:
>
> >Hi,
> >I need to query for an empty column in a certain record.
> >The column in question definitly has some empty entries.
> >I've tried <''>,<null>,<blanks>, and length(column). All
> >come back with no hits.
> >
> >These records were created with sqlloader, if that has
> >anything to do with it. The particlular column either
> >had a text string (varchar2) or nothing. What's the trick?
> >I suspect this is basic stuff; I'm new at this.
> >
> >Solaris 2.51
> >Oracle 7.3.3
> >
> >I'd appreciate any help,
> >crd
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Apr 13 1998 - 12:28:53 CDT