Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

How to convert LONG to any character string (VARCHAR2, CHAR)

User_TDDEPOct 16 2023

I try to convert LONG data type to any character string data type (best char or varchar2) ?

e.g.

SELECT TO_LOB(DATA_DEFAULT) AS TST1 FROM USER_TAB_COLS
WHERE DATA_DEFAULT IS NOT NULL ;

Any idea?

ORA-00932: inconsistent datatypes: expected - got LONG
00932. 00000 - "inconsistent datatypes: expected %s got %s"
*Cause:
*Action:
Error at Line: 4 Column: 8

Comments
Post Details
Added on Oct 16 2023
4 comments
151 views