Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Im attemping to Rank DiscountAmounts from my qvd's then load only the top10 in my load script but the Rowno() is not comming through the preceeding load as im expecting.
Any idea what im doing wrong here ?
discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
[\code]</body>
colinr wrote:
discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
Use recno() instead of rowno() and it should work just fine.
-Rob
Hi Colin,
I think this would work:
discountAmount:
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
noconcatenate
top10:
Load Rank , DISCOUNT_AMOUNT resident Where Rank <11;
drop table Discount;
drop table discountAmount;
forget a reference to the correct resident table in the second load statement
discountAmount:
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
noconcatenate
top10:
Load Rank , DISCOUNT_AMOUNT resident discountAmount Where Rank <11;
drop table Discount;
drop table discountAmount;
colinr wrote:
discountAmount:
Load Rank,DISCOUNT_AMOUNT Where Rank <11;
Load rowno() as Rank,DISCOUNT_AMOUNT resident Discount
Order by DISCOUNT_AMOUNT desc;
Use recno() instead of rowno() and it should work just fine.
-Rob
Cheers That sorted it