Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables to SQL procedure

Status
Not open for further replies.

FlashGorden

IS-IT--Management
Nov 8, 2001
22
0
0
EU
I have a shell that passes 2 variables to a simply SQL procedure (find_record1) which checks if a record is present in the db and outputs a log. The procedure works fine as long as the variables passed in contain only numbers. If any other character is contained in the variable the following error is displayed:

BEGIN find_record1(2, ANI31500300.bad); END;
*
ERROR at line 1:
ORA-06550: line 1, column 23:
PLS-00201: identifier 'ANI31500300.BAD' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

The SQL variables that take those values passed in are varchars.

Could anyone shed any light on this.
Thanks in advance.
 
well, just the string variable

BEGIN find_record1(2, 'ANI31500300.bad'); END;
Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
"The SQL variables that take those values passed in are varchars."

I'd put both in quotes if the above statement is true.

 
:~/ I missed that Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top