Hi All,
I have oracle package which has 2 procs
i have 2 variable
sqlstr varchar2 (2000);
v_end_date Varchar (100);
i perform the below
sqlstr := ‘select max(end _date) from table1 where start_date < sysdate-5 and end_date < sysdate -5’
DBMS_OUTPUT.PUT_LINE(sqlstr);
EXECUTE IMMEDITAE(sqlstr);
v_end_date :-sqlstr;
i need use that v_end_date result to insert into another table which is date column
INSERT INTO LOG_DETAIL( columnA,columnB,columnC)
VALUES(‘A’,’B’, v_end_date);
I wanted the variable values in column C
but im getting reg below error
ORA-06502-PL/SQL: numeric or value error : character string buffer too small
If I change v_end_date DATE to date data type.
getting below
ORA- 01858: a non - numeric character was found where a numeric was expected
what is issue in this? Pls help me. What data type should I use ? And how I should use that variable to insert the data into Table