Convert text into integer
705455Jul 31 2009 — edited Aug 5 2009Hello,
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'
.
.
.