Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reference lexical parameter in formula

Eslam_ElbyalyNov 20 2016 — edited Nov 23 2016

hi ,

using

Report Builder 6.0.8.26.0

- I have a formula which has the following select statement

FUNCTION diff_sales_returnsformula

   RETURN NUMBER

IS

   v_total_sales     NUMBER;

   v_total_returns   NUMBER;

BEGIN

   SELECT NVL (SUM (transaction_price), 0)

     INTO v_total_sales

     FROM pos_items pi, pos_transactions_lines ptl

    WHERE pi.inventory_item_id = ptl.inventory_item_id

      AND branch_id IN :BRANCHES

      AND origin = :p_origin

      AND transaction_type = 4

    AND PTL.CREATED_BY = :CREATED_BY

    AND TRANSACTION_DATE BETWEEN :P_FROM_DATE AND :P_TO_DATE;

:branches is a lexical parameter which has multiple values as a string , the code can not compile .

how to solve this ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2016
Added on Nov 20 2016
20 comments
2,102 views