Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06512 and/or ORA-00936 ... simple procedure problem probably

SniipeDec 6 2006 — edited Dec 6 2006
I'm passing in codes like the following to the stored procedure (below):
",IRE,UK,FR,SCOT,WALES" (a string of words seperated by a ',')

Problem is I get the following error:
ORA-00936: missing expression ORA-06512: at "APPNAME.PKG_TOOL", line 132 ORA-06512: at line 1

I googled the two ORA's but am still stumped. I'd appreciate any help at all as I'm still not overly familiar with SQL.
PROCEDURE sp_check_code_Exist(p_CodeList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
	thissql varchar(1000);

	BEGIN

		thissql := thissql || 'select * from codes_data c where ';
		thissql := thissql || 'c.code in ('|| p_CodeList ||') ';

		open p_cursor FOR thissql;

		begin
		 	 Execute immediate thissql;
		end;

	END sp_check_code_Exist;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2007
Added on Dec 6 2006
12 comments
1,517 views