HomeForum
Welcome, Guest

Deleting processed rows from table
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Deleting processed rows from table

Deleting processed rows from table 1 year, 2 months ago #2058

  • Joe
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Karma: 0
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.

Re: Deleting processed rows from table 1 year, 2 months ago #2070

  • admin
  • NOW ONLINE
  • Moderator
  • Posts: 2182
  • Karma: 12
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
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

Advanced ETL Processor's ability to validate and tranform data without actually loading it into the datawarehouse has saved us a lot of time. We were able to see how data will look like, once it is transformed and which records would fail during data validation.

Antony Clark,
RBS 

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top