Skip to Content
0

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

Jan 05, 2017 at 03:42 AM

222

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Arun Sasi Jan 05, 2017 at 02:42 PM
0

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


1xn93.png (3.2 kB)
39gak.png (5.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Jean Lustria Jan 06, 2017 at 07:29 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Cheers!! :)

0