Viewing 3 posts - 1 through 4 (of 4 total)
Thank you. This helped me alot.
July 4, 2018 at 4:44 am
#1996274
I think this is the way to go:
select rank() OVER (ORDER BY quantity desc ,itemhqid ) as rank,storeID,itemhqid
from ##SalesData
order by rank
October 23, 2012 at 5:57 am
#1551850
##Salesdata is a tempory table which i create. So does not need to be tempory.
I just need a way of giving each store a priorty number based on which sold...
October 23, 2012 at 5:26 am
#1551833