urgent - complex Update
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: urgent - complex Update

  1. #1
    Join Date
    Sep 2000
    Posts
    14
    Hi,

    How can write this Sybase statement in Oracle (8.1.7)?

    mcl

    update ITX_APPLICATION_PATH set
    APPLICATION_ID = (select APPLICATION_ID from ITX_APPLICATION where APPLICATION_NAME = B.APPLICATION_NAME),
    PATH_TYPE = B.PATH_TYPE,
    PHYSICAL_PATH = B.PHYSICAL_PATH,
    DESCRIPTION = B.DESCRIPTION,
    ITX_VERSION = ITX_VERSION+1,
    ITX_MODULE = B.ITX_MODULE
    from ITX_APPLICATION_PATH A, VIP_APPLICATION_PATH B
    where A.PATH_NAME = B.PATH_NAME;



  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Hi, try this:

    update ITX_APPLICATION_PATH
    set
    APPLICATION_ID = (select APPLICATION_ID from ITX_APPLICATION where APPLICATION_NAME = B.APPLICATION_NAME),
    ITX_VERSION = ITX_VERSION+1,
    (PATH_TYPE, PHYSICAL_PATH, DESCRIPTION, ITX_MODULE) =
    (select B.PATH_TYPE, B.PHYSICAL_PATH, B.DESCRIPTION, B.ITX_MODULE
    from VIP_APPLICATION_PATH B
    where ITX_APPLICATION_PATH.PATH_NAME = B.PATH_NAME
    )
    where ITX_APPLICATION_PATH.PATH_NAME in (select distinct PATH_NAME from VIP_APPLICATION_PATH)
    ;

  3. #3
    Join Date
    Sep 2000
    Posts
    14
    tried it and got error

    ORA-00904: invalid column name

  4. #4
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    In order to get a better advice please send more about your tables and goals.
    The query below is just a guess.

    update ITX_APPLICATION_PATH
    set
    APPLICATION_ID =
    (select A.APPLICATION_ID from ITX_APPLICATION A, VIP_APPLICATION_PATH B
    where A.APPLICATION_NAME = B.APPLICATION_NAME
    and ITX_APPLICATION_PATH.PATH_NAME = B.PATH_NAME
    ),
    ITX_VERSION = ITX_VERSION+1,
    (PATH_TYPE, PHYSICAL_PATH, DESCRIPTION, ITX_MODULE) =
    (select B.PATH_TYPE, B.PHYSICAL_PATH, B.DESCRIPTION, B.ITX_MODULE
    from VIP_APPLICATION_PATH B
    where ITX_APPLICATION_PATH.PATH_NAME = B.PATH_NAME
    )
    where ITX_APPLICATION_PATH.PATH_NAME in (select distinct PATH_NAME from VIP_APPLICATION_PATH)

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