Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Comparing data between two tables in two schema
This function comapres two tables.
It's easy to write a cycle for tables in two schemas.
Enjoy it.
Jan Pruner
create function compare_tables( tbl1 VARCHAR2, tbl2 VARCHAR2) return NUMBER
/* Function compares content of two identical tables
|| tbl1, tbl2 are names of tables in format owner.table_name
|| 2001, Jan Pruner
*/
AS
cnt1 number; cnt2 number; cnt3 number; res number; sql_stmt varchar2(100);
if (cnt1 = cnt2) and (cnt2 = cnt3) then
res := 0 ;
else
res := 1 ;
end if;
return res;
end;
> From: "Rao, Maheswara" <Maheswara.Rao_at_Sungardp3.com>
>
> >Reply-To: ORACLE-L_at_fatcity.com
> >To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> >Subject: Comparing data between two tables in two schema
> >Date: Mon, 01 Oct 2001 12:29:41 -0800
> >
> >List,
> >
> >I have two schema. The tables in both schema are having same name and
> >structures.
> >
> >Is there any tool to compare the data between two schema tabels?
> >
> >Thanks,
> >
> >Rao
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jan Pruner INET: jan_at_pruner.cz Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- 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 Tue Oct 02 2001 - 08:13:30 CDT
![]() |
![]() |