6 Replies Latest reply: May 8, 2013 10:31 AM by Christian Erlinger RSS

    Inner Query is excuting properly in 10g SQL developer, but not in Form 6i

    User_SC
      Hi All,

      I am able to excute below query in Oracle SQL developer in 10g , but when I tried to excute it in Forms 6i on WHEN-NEW-FORM_INSTANCE trigger, it is giving me below error message

      SELECT okl2.line_number subline_number, okl2.sts_code subline_status,
      okl2.start_date subline_start_date, okl2.end_date subline_end_date,
      okl2.date_terminated,oks.cognomen line_ref,okl2.ID subline_id,okl2.lse_id,

      (SELECT orig_model_no
      FROM apps.emcoks_msh_subst_models sm
      WHERE okh.contract_number = sm.contract_number
      AND okl.line_number = record_line_id) orig_model_no,
      (SELECT orig_model_qty
      FROM apps.emcoks_msh_subst_models sm
      WHERE okh.contract_number = sm.contract_number
      AND okl.line_number = record_line_id) orig_model_qty

      FROM apps.okc_k_lines_b okl2,
      apps.okc_k_headers_b okh,
      apps.okc_k_lines_b okl,
      apps.okc_k_items oki ,
      apps.okc_k_lines_tl oks
      WHERE 1 = 1
      AND okl2.dnz_chr_id = okl.chr_id
      AND okl.lse_id = 1
      AND okl2.lse_id IN (7, 9)
      AND okl.ID = okl2.cle_id
      AND okl.ID = oki.cle_id
      AND okl2.ID = oks.ID
      AND okl.chr_id = okh.ID
      AND okl2.dnz_chr_id = okh.ID
      AND okl.ID = 130246066126590818122526020119476052469
      order by subline_id;


      Error 103 : Encountered the symbol "Select" when expecting one of the following
      ( - + mod not null others <an identifier>