Hi am using SQLPlus to develop an oracle database.The problem is that I intend to insert a procedure name into a table called available procedures. The problem is that once I write the name of the procedure to be inserted/updated it executes.Now, the procedure itself has a return which is an integer hence the reason for the error. How can I use SQLPlus to insert this procedure name?
-
1Second, you should ask in a manner that give us an ideea of what happens in your code. You should give examples that make us able to reproduce your problem, etc.Florin Ghita– Florin Ghita2012-03-14 12:17:11 +00:00Commented Mar 14, 2012 at 12:17
-
This is strange: "once I write the name of the procedure to be inserted/updated it executes". You have a trigger? Procedures do not return anything, Funtions return something...Florin Ghita– Florin Ghita2012-03-14 12:19:16 +00:00Commented Mar 14, 2012 at 12:19
Add a comment
|
1 Answer
If you are trying to insert the name of a procedure, simply enclose it in single quotes:
insert into available_procedures (procedure_name) values ('MY_PROCEDURE');
and not:
insert into available_procedures (procedure_name) values (MY_PROCEDURE);
since this will (as you found) attempt to run MY_PROCEDURE
2 Comments
Florin Ghita
where my_procedure is a function :)