Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Newbie Question
CK wrote:
> ok I got it fixed, but what am I doing wrong in calling the procedure?
>
> Final proc:
> CREATE OR REPLACE PROCEDURE searchThis2
> (m_stringToSearch varchar, m_search char, result out integer)
> AS
> BEGIN
>
> SELECT INSTR(m_stringToSearch ,m_search , 1,1) INTO result FROM DUAL;
>
> END;
> /
>
> I am trying to call it like this. I am using the Express 10g edition and
> using the web sql commands tool provided with the install.
>
> BEGIN
> searchThis2('Here is my search string', 'c');
> END;
>
> I get the error:
> ORA-06550: line 2, column 1:
> PLS-00306: wrong number or types of arguments in call to 'SEARCHTHIS2'
> ORA-06550: line 2, column 1:
> PL/SQL: Statement ignored1. BEGIN
> 2. searchThis2('Here is my search string', 'c');
> 3. END;
>
>
>
> What am i missing here? Thanks for your help all!
> ~ck
In your code C is not a literal it is a variable. Even in SQL Server it would be a variable. Look at the examples in Morgan's Library of how to use an OUT parameter.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Nov 08 2007 - 12:42:28 CST
![]() |
![]() |