Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

'Row Number () Partition By' syntax problem - forum topic by DataHead

$
0
0

Hi,
Can someone tell me why the below won't work? I've tried everything I can think of.
The error I am getting is "expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword between ')' and the 'Where' keyword".
Thanks
---------------------------------------------------------------------------------------------------
SELECT
Subscription_Id
, Wrls_Prod_Eff_Dt
, Wrls_Prod_Cd
, Wrls_Prod_Ds
FROM
(
SELECT A.*, ROW_NUMBER () OVER (PARTITION BY Subscription_Id ORDER BY Wrls_Prod_Eff_Dt DESC) AS RANK_ID
FROM DW_NLIP_PRV_PLNS A
)
WHERE RANK_ID = 1;
-----------------------------------------------------------------------------------------------------------------------------
 

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>