can someone tell me a way to select all tables from multiple schemas -
and then update records in each of these tables based on a certain criterea.
I wrote a script below - which explains logically what I need to do - but I
don't think I can use a cursor output in the UPDATE as I have below.
Suggestions ?
thanks
vikas
DECLARE
CURSOR cuTab IS
SELECT table_name,column_name
FROM dba_tab_columns
WHERE column_name ='END_DATE'
AND owner='CIS';
recCuTab cuTab%ROWTYPE;
BEGIN
FOR recCuTab IN cuTab LOOP
UPDATE recCuTab.table_name --Get an error here !!
SET end_date = TO_DATE('4712-12-31','YYYY-MM-DD')
WHERE end_date <> TO_DATE('12-31-4712','mm-dd-yyyy')
AND end_date >
TO_DATE('1-1-4712','mm-dd-yyyy');
END LOOP;
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Vikas Kawatra
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).