Skip to Main Content

Oracle Database Discussions

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!

Decode in insert statement

2817195Oct 22 2015 — edited Oct 22 2015

Hi friends,

   I'm running an insert select with decode function as below.. I get Ora-01722 invalid number error

insert into table tname (name,user....)

select col1,col2,..,

DECODE(tab2.col4,'AF','(susbstr(tab2.col8,1,5)||'-'||substr(tab2.col8,6))',tab2.col8) COL8,

....

from tname2 tab2

Both tname.COL8 and tab2.col8 are varchar fields..  Please let me know if there is anything I'm missing in the DECODE statement..

Thank you so much

This post has been answered by SomeoneElse on Oct 22 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2015
Added on Oct 22 2015
5 comments
465 views