1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

inline query?

Discussion in 'SQL PL/SQL' started by hiswapna, Jul 6, 2009.

  1. hiswapna

    hiswapna Active Member

    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    80
    zzzzzzzzzzzzzzzzzzzzzzz
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Hi what is the column # of pieces in the final result?
     
  3. hiswapna

    hiswapna Active Member

    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    80
    i have edited my question now...
     
  4. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Still needs some more explanation ..

    On
    # of pieces
    # or rows
    How reached booked_wt and bkd_vol

    etc..

    Also tell us what did you try so far ...
     
  5. ankur.bhatia

    ankur.bhatia Guest

    please find the query below for booked_wt and booked vol

    Code (SQL):

    SELECT
    iq1.CTR_ID,
    iq2.SHP_PC_ID,
    (
      SELECT SUM(iq4.SHP_PC_WT_QTY)
      FROM inline_query03 iq3, inline_query04 iq4
      WHERE iq3.SHP_PC_ID(+)=iq4.SHP_PC_ID
      AND nvl(iq3.RELATES_TO,iq4.SHP_PC_ID) = iq2.SHP_PC_ID
    ) BOOKED_WT,
    (
      SELECT SUM(iq4.SHP_PC_VOL_QTY)
      FROM inline_query03 iq3, inline_query04 iq4
      WHERE iq3.SHP_PC_ID(+)=iq4.SHP_PC_ID
      AND nvl(iq3.RELATES_TO,iq4.SHP_PC_ID) = iq2.SHP_PC_ID
    ) BOOKED_VOL
    FROM
    inline_query01 iq1,
    inline_query02 iq2,
    inline_query03 iq3,
    inline_query04 iq4
    WHERE
    iq1.SHP_PC_ID=iq2.SHP_PC_ID AND
    iq2.SHP_PC_ID=iq3.RELATES_TO(+) AND
    iq3.SHP_PC_ID=iq4.SHP_PC_ID(+)
    GROUP BY
    iq2.SHP_PC_ID, iq1.CTR_ID
     
    and mention some more details on #rows and #pieces, so that i can suggest you for that also.