Hi, thanks for taking the time to read my question.
I need to get the definition of a view that was defined by others. Note that I am not a DBA on this database.
I tried to query ALL_VIEWS to get the text definition of the view. Problem is, ALL_VIEWS defines the TEXT column as type LONG.
Column definitions for ALL_VIEWS can be found here http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2117.htm#REFRN20305
So I need either 1) a different way to get the text of the view or 2) a way to convert LONG to VARCHAR2 so that I can display it.
I discovered that 2) is a question that has been asked on this forum about a bazillion times. However, though it has been asked a bazillion times, I couldn't find a thread that had an answer. Most of the threads simply say "don't use long, its been deprecated for 15 years. Use CLOB instead". Unfortunately that's not an option for me.
So, with apologies for asking an question that has been asked before, how do you convert LONG to VARCHAR2 in an SQL statement?
Here are some things I tried that didn't work....
SELECT TO_CHAR(TEXT) FROM ALL_VIEWS
SELECT UTL_RAW.CAST_TO_VARCHAR2(TEXT) FROM ALL_VIEWS
Thanks!