RE: How does one get the definition of a view?

  • From: "Roger Xu" <Roger.Xu@xxxxxxxxxxx>
  • To: "Bobak, Mark" <Mark.Bobak@xxxxxxxxxxxxxxx>, "Oracle-L@Freelists. Org \(E-mail\)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 8 Sep 2006 10:49:33 -0500

Thank you - it works! You guys are great!
 
SQL> set long 1000
SQL> set pages 1000
SQL> /
 
TEXT_LENGTH
-----------
TEXT
--------------------------------------------------------------------------------
        872
SELECT RS_SESSION.REGION_ID,
RS_SESSION.SESSION_DATE,
        RS_ROUTE.ROUTE_ID AS ROUTE_ID,
        RS_BAY_SKU.BAY_NUMBER,
        Sum(RS_BAY_SKU.QUANTITY) AS TOTAL_QUANTITY,
        Sum(TS_PACKAGE_TYPE.WEIGHT*RS_BAY_SKU.QUANTITY) AS TOTAL_WEIGHT
FROM TSDBA.RS_SESSION, TSDBA.RS_ROUTE, TSDBA.RS_STOP, TSDBA.RS_ORDER, TSDBA.RS_L
INE_ITEM,
        TSDBA.RS_BAY_SKU, TSDBA.TS_SKU, TSDBA.TS_PACKAGE_TYPE
WHERE   RS_SESSION.PKEY=RS_ROUTE.RN_SESSION_PKEY AND
        RS_ROUTE.PKEY=RS_STOP.ROUTE_PKEY AND
        RS_ORDER.PKEY=RS_LINE_ITEM.RN_ORDER_PKEY AND
        RS_LINE_ITEM.PKEY=RS_BAY_SKU.LINE_ITEM_PKEY AND
        RS_LINE_ITEM.SKU=TS_SKU.SKU(+) AND RS_STOP.PKEY=RS_ORDER.STOP_PKEY AND
        (TS_SKU.PACKAGE_TYPE_ID=TS_PACKAGE_TYPE.PACKAGE_TYPE_ID) AND
        (TS_SKU.REGION_ID=TS_PACKAGE_TYPE.REGION_ID) AND
        (RS_ROUTE.ROUTE_ID)<>'unassigned'
GROUP BY RS_SESSION.SESSION_DATE, RS_SESSION.REGION_ID, RS_ROUTE.ROUTE_ID, RS_BA
Y_SKU.BAY_NUMBER
 

SQL>

-----Original Message-----
From: Bobak, Mark [mailto:Mark.Bobak@xxxxxxxxxxxxxxx]
Sent: Friday, September 08, 2006 10:46 AM
To: Roger Xu; Oracle-L@Freelists. Org (E-mail)
Subject: RE: How does one get the definition of a view?


set long <some_big_number>
try:
set long 10000
 
 
 

-- 
Mark J. Bobak 
Senior Oracle Architect 
ProQuest Information & Learning 

"A human being should be able to change a diaper, plan an invasion, butcher a 
hog, conn a ship, design a building, write a sonnet, balance accounts, build a 
wall, set a bone, comfort the dying, take orders, give orders, cooperate, act 
alone, solve equations, analyze a new problem, pitch manure, program a 
computer, cook a tasty meal, fight efficiently, die gallantly. Specialization 
is for insects."   --Robert A. Heinlein


 

  _____  

From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Roger Xu
Sent: Friday, September 08, 2006 11:42 AM
To: Oracle-L@Freelists. Org (E-mail)
Subject: How does one get the definition of a view?


How do I get the definition of a view?
 
I used the following SQL but not getting all definition text 
- I know something needs to be done on the format of long type.
 
  1  select TEXT_LENGTH,TEXT
  2  from dba_views
  3  where OWNER = 'TSDBA'
  4* and VIEW_NAME  = 'FL_EXPORT_DB_VIEW'
SQL> /
 
TEXT_LENGTH
-----------
TEXT
--------------------------------------------------------------------------------
        872
SELECT RS_SESSION.REGION_ID,
RS_SESSION.SESSION_DATE,
        RS_ROUTE.ROUTE_ID AS ROUT
 

SQL>
 
Thanks,

Roger Xu 


This e-mail is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. Any 
review, dissemination, copying, printing or other use o
____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email Security 
System.



This e-mail is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. Any 
review, dissemination, copying, printing or other use o
____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email Security 
System.

Other related posts: