Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procedure compilation errors

Status
Not open for further replies.

Sambo8

Programmer
May 10, 2005
78
NZ
Hi there,

I'm having a problem with my procedure I want to execute an alter trigger for every tablename in the audittables table concatanate the AUA to the tablename.

Here's my code:

Create or Replace procedure samtest.disable_trigs

IS

tabname IN varchar2(30)

Begin

select 'AUA'||tablename
into tabname
from samtest.auditing
where tablename <> 'auditing';


EXECUTE IMMEDIATE 'ALTER TRIGGER tabname DISABLE';

END;

/

Please can you tell me where I'm going wrong?

Many thanks,
Sam
 
The execute immediate statement is invalid. Try using
Code:
EXECUTE IMMEDIATE 'ALTER TRIGGER '||tabname||' DISABLE';

Also you need to set up a 'cursor for loop' to do each one in turn.

Regards

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top