Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams
variable L_kSite number;
variable L_kPage number;
exec SomeStoredProcedureThatReturnsASite( :L_kSite );
exec SomeStoredProcedureThatAddsAPageToTheSite( :L_kSite, :L_kPage );
update SiteToPageLinkingTable 
set HomePage = 1 
where kSite = :L_kSite and kPage = :L_kPage;

Supposedly the last statement is a valid use of a bind variable but when I try to run the script I get this on the last line:

SQL Error: Missing IN or OUT parameter at index:: 1

I'm not sure how to proceed here as I'm not especially proficient in Oracle.

Do your run this in sqlplus? Is the errorcode you catched ORA-17041? Could you provide signature for both procedures? Are there triggers on table? – Christian13467 Nov 18, 2009 at 8:02 The format of the error message suggests you are using SQL Developer to run this script. Is this the case? If so, what version of the tool? Also, what version of the database? – APC Nov 18, 2009 at 13:39 @APC: SQL Developer 1.5.5, Oracle Express 10.2.0.1.0. @Christian: No; there's no ORA error code at all; I could but the error is definitely occurring on the UPDATE statement; no. – Otis Nov 18, 2009 at 16:56

I had a similar error on my side when I was using JDBC in Java code.

According to this website (the second awnser) it suggest that you are trying to execute the query with a missing parameter.

For instance :

exec SomeStoredProcedureThatReturnsASite( :L_kSite );

You are trying to execute the query without the last parameter.

Maybe in SQLPlus it doesn't have the same requirements, so it might have been a luck that it worked there.

It's not an issue with SQL Developer. The variable L_kSite number; is a specific SQL plus construct. – René Nyffenegger Aug 15, 2014 at 16:52

I think its related with jdbc.

I have a similar problem (missing param) when I have a where condition like this:

a = :namedparameter and b = :namedparameter

It's ok, When I have like this:

a = :namedparameter and b = :namedparameter2  (the two param has the same value)

So it's a problem with named parameters. I think there is a bug around named parameter handling, it looks like if only the first parameter get the right value, the second is not set by driver classes. Maybe its not a bug, only I don't know something, but anyway I guess that's the reason for the difference between the SQL dev and the sqlplus running for you, because as far as I know SQL developer uses jdbc driver.

I had issue in SQL Developer because I was using binds incorrectly. Was using this, copied from log:

variable = ?

should be

variable = :variable

Now SQL Developer prompts me for values.

I got the same error sporadically appearing on some user setup, while others were content with the same report. I had my parameters written in altered case and with nordic letters, for example: Henkilö. I changed them to HENKILO, using only upper case and no nordics, and it did the trick.

The driver is some unknown or varying JDBC version to Oracle.

My error desc was originated from some 3rd party bin: Excel Plugin Error: Failed executing statement (Missing IN or OUT parameter at index:: 4) SQL Statement failed. Please verify and correct it!