I have what I think is a unique problem.I'm building an ASP.NET app with a GridView, basically giving a small bulleted list of related records, for each record in the main table. Here's a simplified version of what I'm trying to do...ie. Final output:---------------------------Joe's Produce | * Apples | * Bananas | * Pears---------------------------Fresh Market | * Apples | * Pears---------------------------City Orchard | * Apples---------------------------
There's only a small number of possible products (about 8).I'm using three tables, one for the companies, one for the products, and one to connect products to companies using companies and products FK's.Companies---------------ID | autoincrement PKName | varchar---------------Products---------------ID | autoincrement PKName | varchar---------------OfferedProducts---------------Company | FK->Company.IDProduct | FK->Products.ID---------------
It's the query I'm having trouble with. If I just do a SELECT with JOINs, I get a row for each product and this isn't the desired output (client wants a tiny bulleted list beside rows that alternate colour)Is it possible to do an "inner" query for each row, and somehow have it returned as bullets? If I need to use a stored procedure, that's cool too, I just can't get my head around the correct way to approach this.Thanks in advance for helping, especially since it's my first post here!