view re-creation

  • From: Ram Raman <veeeraman@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 16 Jul 2009 18:37:53 -0500

Hi

We are trying to create a few hunded  views whose definitions are very big,
longer than 2500 characters. We get the definitions from one database and
create in a target database. Extracting the definition via dbms_metadata or
selecting text from dba_views
gives an output that is like this:


SELECT 999 , C.SETID , A.BUSINESS_UNIT , A.DEMAND_SOURCE , A.SOURCE_BUS_UNIT
, A
.ORDER_NO , A.ORDER_INT_LINE_NO , A.SCHED_LINE_NO , A.INV_ITEM_ID ,
A.DEMAND_LIN
E_NO , A.CUST_ID , A.SCHED_DATE , A.SCHED_TIME , A.QTY_REQUESTED ,
MAX(A.QTY_REQ
UESTED - A.QTY_BACKORDER) , MAX(A.QTY_REQUESTED_BASE - A.QTY_BACKORDER_BASE)
, A
.QTY_BACKORDER_BASE , A.QTY_BACKORDER , A.UNIT_OF_MEASURE , A.PRIORITY_NBR ,
A.S
HIP_TO_CUST_ID , A.SHIP_CUST_NAME1 , A.LOCATION , A.PARTIAL_QTY_FLAG ,
A.BCKORDR
.....


The lines are cut at the end. The resulting DDL needs lots of editing and it
is very time consuming editing the file  which has 140,000 lines. Is there a
way to extract the view definitions without this problem. I tried adjusting
the linesize in sqlplus, but it did not help. Tested in both windows sqlplus
and Unix env.

Thanks.

Other related posts: