Hi I writting a procedure that deletes selected log tables from the database.
I am trying to use a string which depending on the else-if statment concatanates a different where clause to it. I am trying to write a dynamic procedure because The screen works on 52 different log screens. These logs are on serate tab pages, so I can easly creat a string to delete from the correct log with the correct where clause, 1-4 possibillities on the where, all passed into sql_statement_ varchar2(250) However when I try
EXECUTE IMMEDIATE sql_statement_ ;
I get an error message on keyword IMMEDIATE, this is my first time with this statment so am at abit of a loss as to know why?
Do I have to turn sql_statement_ into a procedure somehow, before I can EXECUTE IMMEDIATE
I have hit abit of a wall on this, so as always your advice and tips are greatly recieved.
Cheers,
Indie
I am trying to use a string which depending on the else-if statment concatanates a different where clause to it. I am trying to write a dynamic procedure because The screen works on 52 different log screens. These logs are on serate tab pages, so I can easly creat a string to delete from the correct log with the correct where clause, 1-4 possibillities on the where, all passed into sql_statement_ varchar2(250) However when I try
EXECUTE IMMEDIATE sql_statement_ ;
I get an error message on keyword IMMEDIATE, this is my first time with this statment so am at abit of a loss as to know why?
Do I have to turn sql_statement_ into a procedure somehow, before I can EXECUTE IMMEDIATE
I have hit abit of a wall on this, so as always your advice and tips are greatly recieved.
Cheers,
Indie