Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: is this possible ?
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!
>
>--
>--
-- 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
![]() |
![]() |