- Posts: 33
- Thank you received: 0
Deleting processed rows from table
12 years 6 months ago #2058
by Joe
Deleting processed rows from table was created by Joe
Hi,
I have a transformation, which retrieves data from an Oracle database and writes into a flat file. Then I have to ftp that file and go back to the database.
Once it is done I have to delete the rows from the table by selecting the maximum
and minimum id’s from the flat file and delete all the rows between Basically deleting the rows from the table which was extracted and written into the flat file. The table gets populated dynamically.
Any suggestions would be really useful.
Thanks,
Joe.
I have a transformation, which retrieves data from an Oracle database and writes into a flat file. Then I have to ftp that file and go back to the database.
Once it is done I have to delete the rows from the table by selecting the maximum
and minimum id’s from the flat file and delete all the rows between Basically deleting the rows from the table which was extracted and written into the flat file. The table gets populated dynamically.
Any suggestions would be really useful.
Thanks,
Joe.
Please Log in or Create an account to join the conversation.
12 years 6 months ago #2070
by admin
Mike
ETL Architect
Replied by admin on topic Re: Deleting processed rows from table
Joe
In latest version we have created a working example for you.
Basically it can be done using package variables
Within transformation you save min and max values in package variables than use them for deleting data
begin
SetPackageVariable('MIN_VALUE',[F001]);
SetPackageVariable('MAX_VALUE',[F002]);
Result:=True;
end;
delete from orders where orderno between MIN_VALUE and MAX_VALUE
GO
In latest version we have created a working example for you.
Basically it can be done using package variables
Within transformation you save min and max values in package variables than use them for deleting data
begin
SetPackageVariable('MIN_VALUE',[F001]);
SetPackageVariable('MAX_VALUE',[F002]);
Result:=True;
end;
delete from orders where orderno between MIN_VALUE and MAX_VALUE
GO
Mike
ETL Architect
Attachments:
Please Log in or Create an account to join the conversation.