0

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?

2
  • 1
    Second, 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. Commented 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... Commented Mar 14, 2012 at 12:19

1 Answer 1

4

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

Sign up to request clarification or add additional context in comments.

2 Comments

+1 for giving a sensible answer to an extremly unclear question
where my_procedure is a function :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.