It seems you are trying to concatenate the data from your second load statement to the duplicate table.
In that case what you would like to do is use CONCATENATE before the second reload statement. Which will help to not create sysnthetic keys in the buffer memory.
Again, a doubt, correct me if I am wrong.
Why are you loading the same fields in both of your load statement. It seems many of the field are loaded twice with two different load statements.
For a preceeding load I try this way,
// Preceeding Load statement.
if(Month<Month(Today()), 'Yes','No') as Month_Flag
Month(Calendar) as Month,
Year(Calendar) as Year,
and so on
Hope this helps,
Thanks for the reply guys. Both posts gave me ideas as to how to fix my problem. Below is the solution that worked for me
Where d_duplicate = 'Check';
TempName as d_tempname,
CategoryDesc as d_categorydesc,
WkEndDate as d_wkenddate,
TimesheetNo as d_timesheetno,
Invoice as d_invoice,
Duplicate as d_duplicate,
Hours as d_hours,
if(Hours<0,'N','P') as d_signhours,
Fabs(Hours) as d_positivehours,
Fabs(ChargeValue) as d_positivechargevalue,
ChargeValue as d_chargevalue
Order by TempName, WkEndDate, CategoryDesc, TimesheetNo, Invoice;
rowno() as d_rownoID,
1 as Dummy //Dummy field to not force automatic concatenation
Order by d_tempname, d_wkenddate, d_categorydesc, d_positivehours, d_timesheetno, d_invoice;
Drop Table DuplicatePrefinal;
Drop Field Dummy;