Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Final:
Load*
Resident Temp1;
drop table Temp1;
RENAME Table Final to Main;
STORE Main into
T1:
Load *
FROM
Where [Date] = '1/18/2016';
store T1 into
drop Table T1;
exit script;
On a second look may be this:
Final:
NoConcatenate
Load *
Resident Temp1;
DROP Table Temp1;
RENAME Table Final to Main;
STORE Main into
T1:
NoConcatenate
Load *
FROM
Where [Date] = '1/18/2016';
Store T1 into
DROP Table T1;
Update: You need a NoConcatenate because you are doing a resident load without removing or adding any new fields and the name of fields are not changing. This leads to auto-concatenation to your previous table and the new table will never be created and cannot be Dropped or renamed.
What exact error are you getting?
On a second look may be this:
Final:
NoConcatenate
Load *
Resident Temp1;
DROP Table Temp1;
RENAME Table Final to Main;
STORE Main into
T1:
NoConcatenate
Load *
FROM
Where [Date] = '1/18/2016';
Store T1 into
DROP Table T1;
Update: You need a NoConcatenate because you are doing a resident load without removing or adding any new fields and the name of fields are not changing. This leads to auto-concatenation to your previous table and the new table will never be created and cannot be Dropped or renamed.
add the bold
Final:
noconcatenate
Load*
Resident Temp1;
drop table Temp1;
RENAME Table Final to Main;
STORE Main into
T1:
noconcatenate
Load *
FROM
Where [Date] = '1/18/2016';
store T1 into
drop Table T1;
exit script;
Although I would further fine tune your script by removing the renaming part:
Main:
NoConcatenate
Load *
Resident Temp1;
DROP Table Temp1;
STORE Main into
T1:
NoConcatenate
Load *
FROM
Where [Date] = '1/18/2016';
Store T1 into
DROP Table T1;
Thanks guys