View Single Post
  #1 (permalink)  
Old December 11th, 2003, 07:58 PM
harpua harpua is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing Category then Items

Can somebody please give me some advise on how to implement this, I can do the easy SQL statements, but I get lost on the complex ones and what I've tried doesn't work or I know there is a better way, I just don't know it. I am using ASP, SQL Server. Right now I have one table where I want to select all the Categories and Items and have them display as in my sample, without the categories repeating.

SELECT Category, Item FROM Table1 WHERE Start_Date <= '" & Date & "';

This is how I would like it to display
    Category_01
        Item_01
        Item_02

    Category_02
        Item_01
        Item_02
        Item_03
        Item_04

Can this work with one table or should I make another table then select the category and do some kind of Join statement, also some Categories might not have any Items for that day.

Any help would be appreciated, Thanks in advance.
__________________
Peace
Mike
http://www.eclecticpixel.com
Reply With Quote