Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: finding blank columns

Re: finding blank columns

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 04 May 2006 02:35:31 GMT
Message-Id: <pan.2006.05.04.02.35.34.740624@sbcglobal.net>


On Wed, 03 May 2006 02:50:37 -0700, gpanda28_at_gmail.com wrote:

> Hi all
>
> I want to find out tables having blank columns,
> is there any easy way to finding them.
>
> pl. help
>
>
> thanks
>
> GP

select rowid from table where regexp_like(col,'^\s*$');

This is how it works:

SQL> create table emp1 as select * from emp;

Table created.

SQL> update emp1 set job='BIG BOSS' where job='PRESIDENT';

1 row updated.

SQL> commit;

Commit complete.

SQL> select ename from emp1 where regexp_like(job,'G\s*B');

ENAME



KING
SQL> update emp1 set job=' ' where job='BIG BOSS';

1 row updated.

SQL> commit;

Commit complete.

SQL> select ename from emp1 where regexp_like(job,'^\s*$');

ENAME



KING In order for this to work, your version must be twice as large as 5.1. Well, almost. 5.1.22 on VAX/VMS was the first version that I was administering all by myself.
-- 
http://www.mgogala.com
Received on Wed May 03 2006 - 21:35:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US