Received: from otago.co.uk (root@apollo.otago.co.uk [195.182.175.3]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA03956 for ; Wed, 19 Apr 2000 21:37:52 -0400 (EDT) (envelope-from tim@celestialdesign.co.uk) Received: from tim (cheese2.otago.co.uk [195.182.175.102]) by otago.co.uk (8.9.1/8.9.1) with SMTP id CAA07031 for ; Thu, 20 Apr 2000 02:53:17 +0100 (GMT/BST) Reply-To: From: "Tim Johnson" To: Subject: Re: GROUPING and ORDERING and CONFUSION Date: Thu, 20 Apr 2000 02:28:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200004/209 Hello, I was hoping somebody might be able to help me do this: I have a table with two fields (num int, name text) num | name ---------------------------------------------- 15 | First Category Heading 1510 | first category subheading 1511 | second category subheading 1560 | spurious category subheading 156010| first spurious category subheading 156011| second spurious category subheading 16 | Second Category Heading 1610 | Second category subheading 161010| Second category subheading subheading and so on... My problem is I want to pull that data out and group it so that it comes out just the way it went in.. So my page can read: 15: First Category Heading 1510: first category subheading 1511: second category subheading 16: ... and so on.. I thought I could probably group by num on the first two digits and order by asc? but I can't find a way to make that work. Thanks in advance. Tim Johnson