Hi,
I am trying to compare the row count of table in two different databases but the tables are similar with same DDL. I need to call table name in cursor and database names are parameters of the procedure.
Replace procedure testProc(a varchar(30),b varchar(30))
BEGIN
-- Cursor is having the names of table in order
OPEN MY_CURSOR ;
WHILE (SQLCODE = 0) DO
FETCH MY_CURSOR INTO T_NAME;
END
Now I have to comapre the row count of a.T_name and b.T_name. If they are equal continue and if they are not equal register an error and continue.
Can you please help me in this. Any help would be appreciated.
Thanks
Forums: