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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: is this possible ?

Re: is this possible ?

From: Mladen Gogala <mgogala_at_adelphia.net>
Date: Fri, 23 Jan 2004 22:14:25 -0800
Message-ID: <F001.005DE021.20040123221425@fatcity.com>


What are you trying to get? Column values or (TABLE,COLUMN) combination? You could probably use a function like this:

create or replace function trickery(T varchar2,C varchar2, V number) return number deterministic
as
qry varchar2(2048);
cnt number:=0;
begin
qry='select count(*) from '||T||' where '||C||'='||V; execute immediate qry into cnt;
return(cnt);
end;
/

The rest is simply using this function in a query against dba_tab_columns.

On 01/23/2004 11:54:26 PM, Rohan Karanjawala wrote:
> i hv to write an sql query in which i hv to fetch all the tables frm
> the database having a column say EMPNO and where the value of this
> empno column is say 9 and this should be thru a single sql query
> is this possible ?
>
>
> Thanks and Regds,
>
> Rohan
>
> _________________________________________________________________
> Contact brides & grooms FREE!
> http://www.shaadi.com/ptnr.php?ptnr=hmltag Only on www.shaadi.com.
> Register now!
>

>-- 

> Please see the official ORACLE-L FAQ: http://www.orafaq.net
>-- 

> Author: Rohan Karanjawala
> INET: rohanjava_at_hotmail.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- 
Mladen Gogala
Oracle DBA
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: mgogala_at_adelphia.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sat Jan 24 2004 - 00:14:25 CST

Original text of this message

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