0 Replies Latest reply: Nov 3, 2013 6:46 AM by shabbir RSS

    set block property (group by)

    shabbir

      Hi all,

      i have scenario wherein i want to set block property before execute_query is fired. i want to do something like below, but setting group by and having clause is not working out. kindly help in this regard

       

      cri1 := ' CANCEL_DATE IS NULL ';

       

      cri2 := ' HAVING VERSION = (select max(version) from nfa_headers_all where nfa_number = NFA_HEADERS_ALL.NFA_NUMBER)

                   GROUP BY NLA_ID, NHA_ID, LINE_NUM, DESCRIPTION, BH_CC_ID, QUANTITY, TAX_FOREIGN_VENDOR, UNIT_AMOUNT, FUNC_AMOUNT, LAST_UPDATED_BY, LAST_UPDATE_DATE, CREATED_BY, CREATION_DATE, ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7, ATTRIBUTE8, ATTRIBUTE9, CONSUMED_AMOUNT_PKR ';

       

       

       

      GO_BLOCK('NFA_HEADERS_ALL');

      SET_BLOCK_PROPERTY('NFA_HEADERS_ALL', default_where, cri1 || cri2);

      EXECUTE_QUERY;