Page 1 of 1

Deleting existing rows of the table

Posted: Thu Nov 29, 2007 11:45 am
by vbeeram
Hi All,

I have a need to delete the records of a certain table at the end of the sequence . I have created a job for this where i am using a transformer(input) and a oracle stage(output) where the transformer only has output rows which is nothing but the columns of the particular table i'm trying to delete. and i have set the value of all of it as 0 . and i have given the constraint as LinkRowCount =1 .In the Oracle stage i have given the update action to be "Delete existing rows only "

But i see that the records are not getting deleted
I also was wondering if i can give a after job subroutine in the last job of the sequence where it deletes the records of the table i'm trying to delete.

If so could someone let me know what is the query i'm suppose to write in the after job subroutine .

Any help would be highly appraciated .

Thanks

Re: Deleting existing rows of the table

Posted: Thu Nov 29, 2007 12:30 pm
by chulett
vbeeram wrote:the transformer only has output rows which is nothing but the columns of the particular table i'm trying to delete. and i have set the value of all of it as 0.
Your problem in a nutshell. You have to pass the actual key values for the records you want deleted, you've said to delete records where those fields have a value of 0.

Posted: Thu Nov 29, 2007 1:45 pm
by ray.wurlod
You could fake it with user-defined SQL, but you still have to pass a row with a key column.

Code: Select all

DELETE FROM tablename WHERE :1 = :1 AND col1 = 0 AND col2 = 0