Archives of the TeradataForum
Message Posted: Tue, 11 Jan 2005 @ 10:01:57 GMT
hope someone out there can help me.
I want to get the top N for a range of data where the combination could yield 80,000 rows split across 120 locations
Location Barcode SOH SQL; SELECT Location, Barcode, SOH FROM TableName WHERE SOH < 0
thus i would like to see a result set something like;
LocA;BarcodeA;SOH LocA;BarcodeB;SOH LocA;BarcodeC;SOH LocB;BarcodeA;SOH LocB;BarcodeB;SOH LocB;BarcodeC;SOH LocC;BarcodeA;SOH etc etc etc
I am trying to use the RANKING function but can't figure how to 'reset' the rank back to 1 when a change of location occurs.
any assistance one of you could offer would be greatly appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|