Book a Demo

Author Topic: Import DB schema from ODBC  ... Oracle  (Read 1995 times)

atallec

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Import DB schema from ODBC  ... Oracle
« on: August 07, 2009, 12:09:39 am »
Hi,

I am trying to reverse oracle views.

Those views ared defined in one oracle schema but tables used for building those views are defined in another oracle schema.

How can I reverse properly the dependancies, that is a table list for each view.

Moreover I didn't succeed to reverse the sql script used for building the views.
I always get the same sql order, that is:

CREATE OR REPLACE VIEW "VUE_PIVI_CAL"
AS
S

View example [tables are defined in a so called "robust" schema and the view in another schema]

CREATE OR REPLACE VIEW VUE_PIVI_CAL AS
SELECT
DISTINCT
    substr(tm.nom || tm.versiontm,1,36),
to_char(caltmanticipejournee.jourcalendaire,'DD/MM/YYYY'),
to_char(tm.validitedebut,'DD/MM/YYYY'),
vunitegestion.objet_de_reference
FROM
    robust.tm JOIN
    robust.categorietm ON
        tm.id_categorietm = categorietm.id JOIN
    robust.caltmanticipejournee ON
        tm.id = caltmanticipejournee.id_tm JOIN
    robust.rvligne ON
        tm.id_ligneprincipale = rvligne.id JOIN
    robust.rvligne_vunitegestion ug_offre ON
        rvligne.id = ug_offre.id_rvligne
AND ug_offre.role = 'com.ratp.rrs.om.organisationtransport.VersionUniteConceptionOffre' JOIN
    bsx.vunitegestion ON
        ug_offre.id_vunitegestion = vunitegestion.id_version
WHERE
    categorietm.identifiant = 1 -- TM Type Jour
AND CalTManticipejournee.jourcalendaire >= sysdate
AND caltmanticipejournee.estactif = 1
WITH READ ONLY