convert to oracle sql
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: convert to oracle sql

  1. #1
    Join Date
    Mar 2008
    Posts
    45

    convert to oracle sql

    here is a db2 query
    please convert into sql
    INSERT INTO AUDIT.AUDIT_FILE_SEQ_MISSING_TEMP (SRC_NAME,SRC_DT,SRC_SEQ,MISSING_CODE)

    with r (SRC_NAME,TT_FILE_NO, incr,end) as ( select MSC_ID_CHU, 0,JUMP_INTERVAL,RECYCLE_VALUE from AUDIT.AUDIT_JUMP_MASTER
    union all select r.SRC_NAME, r.TT_FILE_NO + r.incr, r.incr, r.end from r
    where r.TT_FILE_NO+r.incr+1 <= r.end ),SEQ
    (SRC_NAME,TT_FILE_NO,EVENT_START_DATE) as ( SELECT A.SRC_NAME, SL.TT_FILE_NO, A.SRC_DT FROM
    AUDIT.AUDIT_FILE_SEQ_CONTROL_DETAIL A INNER JOIN r SL ON A.SRC_NAME = SL.SRC_NAME
    WHERE SL.TT_FILE_NO BETWEEN A.SRC_START_SEQ AND A.SRC_END_SEQ AND A.SRC_DT = '2010-04-08')
    SELECT SRC_NAME,EVENT_START_DATE,TT_FILE_NO, 0 FROM SEQ
    WHERE EVENT_START_DATE = '2010-04-08' EXCEPT
    SELECT SRC_NAME,SRC_DT,SRC_SEQ,0 FROM AUDIT.AUDIT_FILE_SEQ_MASTER WHERE SRC_DT = '2010-04-08' ;

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    how about do it yourself?

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Here is a clue...

    DB2 EXCEPT == Oracle MINUS
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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



Click Here to Expand Forum to Full Width