![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 11 Jan 2005 @ 12:10:16 GMT
Try :
Select
location
,Barcode
,SOH
,RANK() OVER (PARTITION BY location
ORDER BY Barcode, SOH) as 'RankValue
From
tablename
Where soh < 0
QUALIFY RankValue <=N
;
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||