• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Oracle stored proc simple problem

Sounds like this project is going to hell in a handcart.
 
Sounds like this project is going to hell in a handcart.

It was destined to do that the day SY submitted his application form.

A little knowledge is a dangerous thing as this topic clearly demonstrates.
 
Leave the coding for the Bobs.
 
This is why Oracle does my f****** nut in.

Consider the following stored procedure call :

Code:
DECLARE
commentTypeId integer;
BEGIN
Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
END;

According to the examples on the web this is fine. According to the examples given on here this is fine.

According to the SQL Developer tools THIS IS NOT FINE. :tantrum:

PLS-00103: Encountered the symbol SP_ADD_COMMENT_TYPE when expecting one of the following ......

I have tried it with and without EXEC. I have tried it with and without CALL. I have tried it in SQL+.

:rolleyes:
 
I haven't got a clue but have you tried it without the space:

Exec SP_ADD_COMMENT_TYPE('New comment Type', commentTypeId);

Most programming languages don't have a space between a function and parameters...
 
I haven't got a clue but have you tried it without the space:



Most programming languages don't have a space between a function and parameters...
Most - C-style anyway - allow it though :) Worth a try though.
 
Code:
DECLARE
commentTypeId integer;
[B][I]IS[/I][/B]
BEGIN
Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
END;

is what I think is missing.
 
Oracle is rusty, but don't you need a colon in front of the variable?

And it's not got a value - what's it trying to do?
 
This is why Oracle does my f****** nut in.

Consider the following stored procedure call :

Code:
DECLARE
commentTypeId integer;
BEGIN
Exec SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
END;

According to the examples on the web this is fine. According to the examples given on here this is fine.

According to the SQL Developer tools THIS IS NOT FINE. :tantrum:



I have tried it with and without EXEC. I have tried it with and without CALL. I have tried it in SQL+.

:rolleyes:

This is supposed to work
Code:
DECLARE
commentTypeId integer;
BEGIN
 SP_ADD_COMMENT_TYPE ('New comment Type', commentTypeId);
END;

But if that isn't working then it may indicate that there is something wrong with the SP..or a permissions issue. Like the execute privilege is not granted to you...which would be odd if you created the SP.

You're using SQL Developer so when you look at the SP in the procedures 'folder' is there a 'x' next to the SP?
 

Advertisers

Back
Top