Thursday, February 09, 2012  | 
Welcome to Module Masters support forums - the primary support mechanism for our products. Feel free to post your questions, and we will aim to respond in a timely manner.  We also encourage our users to post any feedback you may have.  You may also email us directly at service@modulemasters.com
Subject: Apply top & Group By
Prev Next
You are not authorized to post a reply.

Author Messages
muniappanUser is Offline

Posts:53

11/20/2007 14:43  

I want to show top selling items for each store. Sample SQL Query is "SELECT TOP n ItemNumber FROM Inventory Group By Store" n - is the dynamic value. I am accepting this n parameter from the user. If the user is giving 5 for n then, I want to show top 5 selling items for each store. It will be greatfull, If anybodies giving me an idea of how to do this?.

Thanks

muniappanUser is Offline

Posts:53

11/20/2007 17:33  
I have done it with the row_number function.
hostUser is Offline

Posts:497

11/20/2007 19:49  
good deal!
You are not authorized to post a reply.



ActiveForums 3.7
Copyright 2011 by Module Masters Privacy StatementTerms Of Use