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!

Convert text into integer

705455Jul 31 2009 — edited Aug 5 2009
Hello,

Is it possible to pass a parameter to an Oracle procedure containing a text string that I need to convert it into integer and use it as a search criteria in the Where clause?

For example, in the stored procedure the parameter in_text would contain ‘111,222,333,444,555,666’, but I need to convert this string value into the integers as 111,222,333,444,555,666 and use them in the Where clause.

Any help would be appreciated.

CREATE OR REPLACE PROCEDURE A_Procedure (in_text IN VARCHAR2(100))
AS
INSERT INTO b_table (column_id)
SELECT column_id
FROM a_table
WHERE column_id IN in_text –the parameter in_text contains '111,222,333,444,555,666'
.
.
.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2009
Added on Jul 31 2009
11 comments
1,291 views