Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> View definition oddities

View definition oddities

From: Poras, Henry R. <Henry_Poras_at_dfci.harvard.edu>
Date: Wed, 03 Dec 2003 11:49:25 -0800
Message-ID: <F001.005D88D8.20031203114925@fatcity.com>


I found something strange when trying to copy a view from one database to another. I spooled the text from dba_views and ran the CREATE VIEW AS ... statement. There was an error because one of the fields needed an alias (it was SUBSTR(xxx)). I went back to the source database and poked around a bit. The view definition from dba_views had no field aliases, but dba_tab_columns did.

For example, dba _views would show something like: View_name: test
Text: SELECT SUBSTR(name1,3) FROM emp

While dba_tab_columns would have:
Table_name: emp
Column_id: 1
Column_name: ename

as if the view_text was SELECT SUBSTR(name1,3) ename FROM emp

What's up here?

Henry

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Poras, Henry R.
  INET: Henry_Poras_at_dfci.harvard.edu

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Dec 03 2003 - 13:49:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US