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!

EXECUTE IMMEDIATE ORA-01722 invalid number

582070Dec 10 2007 — edited Dec 10 2007
hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2008
Added on Dec 10 2007
6 comments
2,056 views