EXECUTE IMMEDIATE ORA-01722 invalid number
582070Dec 10 2007 — edited Dec 10 2007hi all
i have a plsql procedure in which the following statement which gives this error ORA-01722: invalid number
sql_stmt :='UPDATE Student set '||stu_gradefor||'=TO_NUMBER('||stu_marks||') where UserID='||stu_UID;
EXECUTE IMMEDIATE sql_stmt;
here all variables (stu_marks,stu_gradefor and stu_UID) are varchar2 coming from different procedure(form) but in the table named Student column HW1 (stu_gradefor) is of datatype number.
I have tried a lot but could not make it to work. Is it that we cannot enter an number through EXECUTE IMMEDIATE? If Possible can somebody help me with this?
Thanks a lot.
Regards
Jyoti