Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing an array of integers to stored procedure

 
Gireesh Mulage
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All ,


I am facing a problem while writing a procedure .... please help me on this ....

I have to pass the parameter of type varchar2 to procedure . The parameter can have value like 1,2,3 .
Using that parameter i have to get some values from one table say 'select id from YY where XX in (input parameter);' I am getting ORA-01722 and ORA-06512 errors while execting the procedure . We are using Oracle 10 G .


How do i split the values ?

Thanks
Gireesh Mulage
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gireesh,

You can pass the array as a string parameter then parse it into numbers to form an array.
Then you may continue with a loop or execute immediate.

Or as an alternative take a look at what Tom says.

Regards,

Fatih.
 
Gireesh Mulage
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Fatih ,

It worked .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic