select -- substr(msg_name,1,8), fld_seq_no, substr(fld_name,1,40) fld_name, fld_type, fld_length, fld_precision from message_dict where msg_name like ('&msg') order by fld_seq_nO
Your biggest hurdle is going to be the LONG datatype. Why are you using that? That was deprecated a long time ago. You really should be using a CLOB.
If you cannot change the data type, then I believe your best option is going to be to temporarily convert it to a CLOB. The unfortunate part there is that it would involved additional steps. The easiest way I know if to do it is using the TO_LOB function, however that can only be used in an insert statement. I would convert the LONG to a CLOB using a global temporary table, then you can use the DBMS_LOB.SUBSTR function to do the substrings that you need.
Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.
If you cannot change the data type, then I believe your best option is going to be to temporarily convert it to a CLOB. The unfortunate part there is that it would involved additional steps. The easiest way I know if to do it is using the TO_LOB function, however that can only be used in an insert statement. I would convert the LONG to a CLOB using a global temporary table, then you can use the DBMS_LOB.SUBSTR function to do the substrings that you need.