Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Posts
    6

    Unanswered: Oracle to db2 sql

    We are migrating a database from oracle to db2.Could any one help me in conveting the below sql from oracle to db2

    select level,
    v_equi.equnr,
    v_equi.sernr,
    v_equi.hequi,
    v_equi.eqktu,
    v_equi.datab,
    v_equi.datbi,
    v_equi.eqtyp,
    eqst.stlnr,
    eqst.werks
    from v_equi, eqst
    where v_equi.equnr = eqst.equnr(+)
    and v_equi.iwerk = eqst.werks(+)
    and v_equi.spras = 'E'
    start with v_equi.tplnr = :ws_iflo-tplnr
    connect by prior v_equi.equnr = v_equi.hequi

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    What DB2 version/platform? That query should work without any changes if you use the Oracle compatibility mode in DB2 LUW 9.7 and up.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2013
    Posts
    6
    Thank you so much .Ours is DB2 10.5

    I will try to enable it using DB2_COMPATIBILITY_VECTOR

    Thanks once again

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Please note that to enable _all_ compatibility functions you need to set the registry variable DB2_COMPATIBILITY_VECTOR=ORA, restart the DB2 instance, then create the database.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •