cancel
Showing results for 
Search instead for 
Did you mean: 

how to implement teradata qualify row number() over (partition by) in BODS

Former Member
0 Kudos

Hi,

I have a project requirement that requires to do push down sql for all filter conditions. The terdata sql code is as follows: qualify row number() over (partition by field1, field2 order by field1, field2) = 1. How do I write this using pushdown_sql in BODS?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks a lot Arun for your response.. that's also the other implementation that I was thinking but just checking if it's possible to implement it using pushdown_sql

former_member198401
Active Contributor
0 Kudos

Cheers!! 🙂

former_member198401
Active Contributor
0 Kudos

Hi

The above statement cannot be used in the where clause because it contains aggregate function.

You can instead use gen_row_num_group() function.

Mapping for ROWNUM should be as below

Output should look something like below:

You can further filter out the ROWNUM with the value 1 🙂

Hope this is useful

Regards

Arun Sasi