Execute immediate [message #312478] |
Wed, 09 April 2008 00:42 |
sundarfaq
Messages: 235 Registered: October 2007 Location: Chennai
|
Senior Member |
|
|
Hi,
i need to enable the all disable constraints in schema.
I wrote query using execute immediate statement but it shows a
identifier is too long error.
scripts:
DECLARE
CURSOR c1 IS
SELECT table_name, r_constraint_name
FROM user_constraints
WHERE status = 'DISABLED';
v_table_name user_constraints.table_name%type;
v_constraint_name user_constraints. r_constraint_name%type;
BEGIN
OPEN c1;
LOOP
FETCH c1
INTO v_table_name, v_constraint_name;
EXECUTE IMMEDIATE 'ALTER TABLE'|| v_table_name || 'ENABLE CONSTRAINTS'|| v_constraint_name;
EXIT WHEN C1%NOTFOUND;
END LOOP;
CLOSE c1;
END;
ORA-00972: identifier is too long
ORA-06512: at line 14
how can we resolve it?
Thanks,
Michael
|
|
|
|
|