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!

Replace Function

KSSJan 29 2013 — edited Jan 29 2013
Hi ,

I have following query from my custom tool, bind variable value arecoming like this ( '1000,8000' ) :


select * from table where check_number IN ('1000,8000')

In above sql 1000 and 8000 are two check numbers user entered in Text field prompt. I just tried to convert that into '1000','8000' wt following replace statement:

select chr(39)||replace('1000,8000',chr(44),chr(39)||chr(44)||chr(39))||chr(39) from dual ---this is working fine as expected.

Its not working if replace same in my main sql:

select * from table where check_number IN (chr(39)||replace('1000,8000',chr(44),chr(39)||chr(44)||chr(39))||chr(39))

Could you please help me to resolve this or provide me another way to do it ?

Thanks in advance!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2013
Added on Jan 29 2013
2 comments
564 views