| ORA-01722: invalid number [message #630339] |
Wed, 24 December 2014 18:20  |
|
|
Hi,
When executing the below code in stored procedure, I am getting 'ORA-01722 : invalid number'. The variable 'V_LIST' holds the value of 10,20,40. Please help.
PROCEDURE INTIALIZE_SECOND(DUMMY NUMBER)
AS
-- Variable declaration
V_LIST VARCHAR2(100);
BEGIN
SELECT VALUE INTO V_LIST FROM CONFIG_PARAMS
WHERE NAME = 'notf';
MERGE INTO TEMP ST USING
(SELECT EXT.KEY
FROM EXTN EXT, DETAILS D
WHERE EXT.KEY = D.KEY
AND EXT.STATUS IN V_LIST
) INNER_QUERY ON (ST.KEY = INNER_QUERY.KEY)
WHEN NOT MATCHED THEN
INSERT
(
SEQ_NO,
KEY,
FLAG
)
VALUES
(
SEQ.nextval,
INNER_QUERY.KEY,
'Y'
);
END INTIALIZE_SECOND;
|
|
|
|
|
|
|
|
| Re: ORA-01722: invalid number [message #630410 is a reply to message #630356] |
Fri, 26 December 2014 10:34   |
|
|
The issue is when I am trying to use the variable 'v_list' in a WHERE CLAUSE within the merge query, I am getting this error. This variable holds a list of comma separated numbers(12,23,234).
Sorry team for not posting the tested code. As I cannot be able to post the original code.
|
|
|
|
|
|
|
|