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!

how to us cast in an insert

482810Oct 10 2006 — edited Oct 10 2006
Hi All,
Does anyone know how to use cast in an insert statement ie

insert into myTable(fieldA)
select cast(fieldA as integer) from yourTable;

fieldA is an integer in myTable
fieldA is an varchar2(1) in yourTable

The actual values for fieldA in yourTable is 1 or 0.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2006
Added on Oct 10 2006
8 comments
495 views