> I do not quite understand the desired output. The example seems as if 
> it is just ordered by: ItemNum, Sort1, Sort2. I am sure it is not that 
> simple. Could you explain how the desired results are different? 


Yeah, I didn't give the best example. Basically ignore the number of the Item, 
because it doesn't have any information that relates at all to the order they 
need to be sorted. Changing the sort values so the problem is more obvious, 
this is what I get when I order on the Sort values alone. 

ItemY - 1 - 1 
ItemX - 1 - 2
ItemZ - 1 - 2
ItemZ - 2 - 1
ItemX - 2 - 2
ItemY - 2 - 3

When what I need is this:

ItemY - 1 - 1 
ItemY - 2 - 3
ItemZ - 1 - 2
ItemZ - 2 - 1
ItemX - 1 - 2 
ItemX - 2 - 2


For now, I'm just doing a query-of-queries to get the results I need, I 
couldn't figure out any other way to do it in a single query. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3268
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to