-
Converting varchar2(512) to RAW(512)
Hi gurus
I need to convert column with a datatype varchar2(512) to a RAW(512) datatype. It seems most people want to do the opposite. Is there a
standard PLSQL or SQL function in Oracle 9i to convert ?
Thanks in advance
Mark
-
SQL> create table testtable (id number,name varchar2(512));
Table created.
SQL> insert into testtable values (1,'firestorm');
1 row created.
SQL> commit;
Commit complete.
SQL> alter table testtable add nameraw raw(512);
Table altered.
SQL> update testtable set nameraw=utl_raw.cast_to_raw(name);
1 row updated.
SQL> commit;
Commit complete.
SQL> alter table testtable drop column name;
Table altered.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|