1 Reply Latest reply: Jul 2, 2012 11:35 AM by Jason_(A_Non) RSS

    How to set correct parameter range of gl accounts

    jnlim
      Hi experts,

      I am trying to produce records for a specific range of accounts. How can I write it correctly?
      Below is how I do it. It produced wrong results because it also give some accounts that is not on the range that I input as parameters.

      AND jeh.period_name >= :FPERIOD_NAME
      AND jeh.period_name <= :TPERIOD_NAME

      AND (gcc.segment1 || '-' || gcc.segment2 || '-' || gcc.segment3 || '-' || gcc.segment4 || '-' || gcc.segment5 || '-' || gcc.segment6 || '-' || gcc.segment7) >= NVL(:P_ACCOUNT_FROM,(gcc.segment1 || '-' || gcc.segment2 || '-' || gcc.segment3 || '-' || gcc.segment4 || '-' || gcc.segment5 || '-' || gcc.segment6 || '-' || gcc.segment7))
      AND (gcc.segment1 || '-' || gcc.segment2 || '-' || gcc.segment3 || '-' || gcc.segment4 || '-' || gcc.segment5 || '-' || gcc.segment6 || '-' || gcc.segment7) <= NVL(:P_ACCOUNT_TO,(gcc.segment1 || '-' || gcc.segment2 || '-' || gcc.segment3 || '-' || gcc.segment4 || '-' || gcc.segment5 || '-' || gcc.segment6 || '-' || gcc.segment7))

      AND src.user_je_source_name = NVL(:P_SOURCE,src.user_je_source_name)


      Please help.

      Thank you.

      Pam