This discussion is archived
0 Replies Latest reply: Jun 22, 2013 8:07 AM by BobWil1214 RSS

ORA-00936 missing expression in select   -currency_name = "CAD") as CAD_AMT,

BobWil1214 Newbie
Currently Being Moderated

PROCEDURE SP_USD_CAD_Exchange
   (
    SCUR                      IN OUT S_CUR,
       V_DEST_SBS_NO           IN NUMBER,
      V_CREATED_SHORT_DATE_DRG  VARCHAR2,
       V_SBS_NO_LOK             VARCHAR2)
       
IS
  TMPSTRSQL LONG; 
  d_cad   LONG;
  d_usd   LONG;
 
   BEGIN
   d_cad := 'CAD';
   d_cad := 'USD';

TMPSTRSQL := 'select
           created_date as invc_date,
           invc_no,
           sbs_no as SBS_NO,
           (select amt from invc_fee_v where invc_fee_v.invc_sid = invc_udf_v.invc_sid and fee_type = 3) as USD_Fee,
           (select taken - given from invc_tender_v where invc_tender_v.invc_sid = invoice.invc_sid and currency_name = "CAD") as CAD_AMT,
           (select taken - given from invc_tender_v where invc_tender_v.invc_sid = invoice.invc_sid and currency_name = "USD") as USD_AMT,
           udf_2 as direction
           from invoice
           join invc_udf_v on invc_udf_v.invc_sid = invoice.invc_sid
           where invoice.sbs_no = 1
           and bitand(proc_status, 65536) = 0 --not reversed
           and bitand(proc_status, 131072) = 0 --not reversing
           AND invc_udf_v.UDF_2 = 1'

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points