One Star

[resolved] How can I store the Last row in another table also

Hi All,

I am selecting data from a table.
and while doing transformation, I need to store "last row" data in another table also.

Can any one help me in finding out the last row?

Thanks in Advance.
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] How can I store the Last row in another table also

Hi,
You can try to do this with Numeric.Sequence but it's quite complex.
1. you create a file which contains a numeric sequence, this file has to be sorted by desc. You also add this sequence on your source table, no need to add it in your database, just use a tBufferOuput or a temporory file which contains each row+numsequence.
2. Make a innerjoin based on their sequence. The tFileInput should have a limit to 1, so it will only read the 1st line, ie the highter sequence number.
2 REPLIES
One Star

Re: [resolved] How can I store the Last row in another table also

Hi,
You can try to do this with Numeric.Sequence but it's quite complex.
1. you create a file which contains a numeric sequence, this file has to be sorted by desc. You also add this sequence on your source table, no need to add it in your database, just use a tBufferOuput or a temporory file which contains each row+numsequence.
2. Make a innerjoin based on their sequence. The tFileInput should have a limit to 1, so it will only read the 1st line, ie the highter sequence number.
One Star

Re: [resolved] How can I store the Last row in another table also

Thank you very much