set LONG 10000
select TEXT from ALL_VIEWS where view_name = ‘MY_VIEW‘;
Line one must be at least the size of the statement used to create the view. Either pick a really big number if you think the view is large or use the following to determine how long it is first. If it isn’t, the text will be truncated
select text_length from all_views where view_name = ‘MY_VIEW’
NOTE: name of the view is case sensitive as are most every thing in Oracle.
If you want to capture output to something other than a SQL Plus window such as a file, be sure to include do the following before you execute the select statement.
spool c:\v_person.sql
To close the file when you are done writing output to it, call the following:
spool off
To summarize:
select text_length from all_views where view_name = ‘MY_VIEW’
10000
– whatever value you get back, use on the next statement.
set LONG 10000
spool c:\v_person.sql
select TEXT from ALL_VIEWS where view_name = ‘MY_VIEW‘;
spool off