Usage of Qualify in where Clause

Analytics
N/A

Usage of Qualify in where Clause

Hi,

Can any one suggest me whether i can use qualify in where clause?

if so, help me to resolve the below query's error

SELECT *

FROM CURRENCY ctrh

CROSS JOIN PERIOD RCP

WHERE Trans_Start_Dt <= RCP.END_DT

AND Trans_End_Dt >= RCP.START_DT

And currency_rate_type_cd = '0006'

And CTRH.Source_Currency_Cd = 'X'

AND CTRH.Global_Currency_Cd='Y'

QUALIFY ROW_NUMBER() OVER(PARTITION BY GLOBAL_CURRENCY_CD,SOURCE_CURRENCY_CD, CURRENCY_RATE_TYPE_CD

ORDER BY Trans_Start_Dt DESC)=1

thanks in advance :)
1 REPLY
Teradata Employee

Re: Usage of Qualify in where Clause

Hello,

The query you provided should work (in V2R6 it does). Can you please explain what exactly you are willing to do?

Regards,

Adeel