Thursday, May 15, 2014

Copy data from one dropped table to another

// Copy data from one dropped table to another
static void EmployeeDetailsCopyTableData(Args _args)
{
    EmployeeDetails      employeeDetails; // Table From Copying
    CopyOfEmployeeDetails copyOfEmployeeDetails; // Duplicated Table want to copy data from base table
    ;

    ttsBegin;
    // Clear the data from the copy table
    delete_from copyOfEmployeeDetails;

    while select employeeDetails
    {
        buf2Buf(employeeDetails, copyOfEmployeeDetails);
        copyOfEmployeeDetails.insert();
    }
 
    ttsCommit;
}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...