you need to add an ORDER BY clause to your query:

ORDER BY group, displayorder

('group' is a reserved word, btw...if that really is currently your
column name you might want to look into changing that)


On Thu, 03 Feb 2005 21:10:35 -0500, Les Mizzell <[EMAIL PROTECTED]> wrote:
> I have records in a SQL Server database that I'm displaying by GROUP -
> but need to order stuff within each group as well.
> 
> I have a column for the GROUP and another column for the DISPLAY ORDER
> so the client can order the specific items as he wishes.
> 
> Let's say there's currently five items in the database. If he adds a NEW
> RED ITEM after the other items in the database, I end up with the
> display doing the below - but I need the RED items to stay together and
> in order.
> 
> RED
>    red thing 1
>    red thing 2
>    red thing 3
> BLUE
>    blue thing 1
>    blue thing 2
> RED
>    red thing 4
> 
> I've got no problems arranging the order without the GROUPS, and I've
> got no problem display the GROUPS without the order. Getting the two to
> work together is giving me a fit...
> 
> Advice?
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193032
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to