Bruce, I would add a column hierarchyLevel and order by that column ~Svetlana Rudkovsky o o @..@ (----) ( )--( ) o0..0o
-----Original Message----- From: Bruce Sorge [mailto:[EMAIL PROTECTED] Sent: Thursday, October 11, 2007 6:04 PM To: CF-Talk Subject: Query Question I have a simple select query: Select parentID, title, body, status, hierarchy From pages Where status='A' Order by hierarchy The hierarchy field looks like this: 1 1~7 1~8 1~9 1~10 1~12 1~12~13 1~12~14 and so on. The problem is that when I run this query, it orders them like this: 1 1~10 1~12 1~12~13 1~12~14 1~7 1~8 and so on. So how can I get it where it orders them the way they are supposed to? Thanks, Bruce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290940 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4