0 Replies Latest reply: Jan 30, 2013 1:50 PM by user480768 RSS

    Transfer view from MS SQL 2008 to Oracle 11g, the keyword AS has problems

    user480768
      Look at following two views' sql codes, first one from original SQL Server, second from Oracle 11g after migrated from SQL server, you may see the keyword "AS" has problem during the migration process.


      The view (azteca.LND_CHILD_OBJECT_VW) from MS SQL Server:

      SELECT azteca.LND_CHILD_OBJECT.LND_CHILD_OBJECT_ID,
      azteca.LND_CHILD_OBJECT.LND_OBJECT_ID,
      azteca.LND_OBJECT.OBJECT_ID,
      azteca.LND_CHILD_OBJECT.CHILD_ID,


      LND_OBJECT_CHILD.OBJECT_ID AS CHILD_OBJECT_ID,


      azteca.LND_CHILD_OBJECT.CREATED_BY,
      azteca.LND_CHILD_OBJECT.DATE_CREATED,
      azteca.LND_CHILD_OBJECT.MODIFIED_BY,
      azteca.LND_CHILD_OBJECT.DATE_MODIFIED
      FROM azteca.LND_CHILD_OBJECT INNER JOIN
      azteca.LND_OBJECT ON azteca.LND_OBJECT.LND_OBJECT_ID = azteca.LND_CHILD_OBJECT.LND_OBJECT_ID INNER JOIN
      (SELECT OBJECT_ID, LND_OBJECT_ID
      FROM azteca.LND_OBJECT) AS LND_OBJECT_CHILD ON LND_OBJECT_CHILD.LND_OBJECT_ID = azteca.LND_CHILD_OBJECT.CHILD_ID


      Oracle 11g View:

      SELECT LND_CHILD_OBJECT.LND_CHILD_OBJECT_ID ,
      LND_CHILD_OBJECT.LND_OBJECT_ID ,
      LND_OBJECT.OBJECT_ID ,
      LND_CHILD_OBJECT.CHILD_ID ,


      LND_OBJECT_CHILD.OBJECT_ID_ CHILD_OBJECT_ID ,


      LND_CHILD_OBJECT.CREATED_BY ,
      LND_CHILD_OBJECT.DATE_CREATED ,
      LND_CHILD_OBJECT.MODIFIED_BY ,
      LND_CHILD_OBJECT.DATE_MODIFIED
      FROM LND_CHILD_OBJECT
      JOIN LND_OBJECT
      ON LND_OBJECT.LND_OBJECT_ID = LND_CHILD_OBJECT.LND_OBJECT_ID
      JOIN ( SELECT OBJECT_ID ,
      LND_OBJECT_ID
      FROM LND_OBJECT ) LND_OBJECT_CHILD
      ON LND_OBJECT_CHILD.LND_OBJECT_ID = LND_CHILD_OBJECT.CHILD_ID;