Sunday, 3 August 2014

Get sql statement form the select statement ax 2012 R2

static void SR_getSQLStatement(Args _args)
{
    CustTable custTable;
    CustTrans custTrans;
    ;
    select generateonly firstOnly AccountNum, CustGroup from custTable
                           join custTrans where custTrans.AccountNum == custTable.AccountNum;
    info(custTable.getSQLStatement());
}
public void executeQuery()
{
   Query q;
   QueryBuildDataSource qbds;
   ;
   q = this.query();
   qbds = q.dataSourceName("PurchTable"); //Replace with the       current Table
   info( qbds.toString() );
   super();
}

No comments:

Post a Comment