5 Replies Latest reply: Sep 30, 2016 6:59 AM by UPALI WIJERATNE RSS

    Exists

    UPALI WIJERATNE

      Hi

       

      I have following data load script with exits command but It does not execute with an error message. pls correct me

       

      Let Vdate=Num(Date(Makedate(2015,09,01),'D/M/YYYY'));

       

       

       

      debtors:

      LOAD *,

      DATE(FLOOR(TRAN_DAT))AS TRAN_DATE,

      DATE(FLOOR(RISK_DAT))AS RISK_DATE

      where num(date(TRAN_DAT,'D/M/YYYY'))>=$(Vdate);

      sql

      select

      det_debt_code AS DEBTOR_CODE,

      trunc(det_ref_date) as Tran_dat,

      trunc(det_risk_date) as Risk_dat,

      det_hc_amt as Amount,

      det_ref_c as Ref_c,

      det_ref_2 as Ref_no,

      det_txntype as TXN_type

      from debtor

      where det_txntype='1'

      ;

      load *

      where Exists(Ref_c);

      sql

      select

      det_debt_code AS DEBTOR_CODE,

      trunc(det_ref_date) as Tran_dat,

      trunc(det_risk_date) as Risk_dat,

      det_hc_amt as Amount,

      det_ref_c as Ref_c,

      det_ref_2 as Ref_no,

      det_txntype as TXN_type,

      det_ref_c as Ref_c,

      det_txntype as TXN_type

       

      from debtor

      where det_txntype<>'1'

      ;

      I want to load data from 2nd script where Ref_c matches with Ref_c of 1st script