February 27, 2005 at 4:21 pm
The first table is a SQL table. A specific file is suitable for specific products. I want to produce a view like the second table, in this way I can display the files that are suitable for a specific product. What is the best way to set this query up? I need the VB 'split' command to split the products from the 'for product' field in the first table. After the split, in which each product get's 1 row, I want to sum all files that are suitable. Is this possible? Thank you in advance! 🙂
|
|
February 28, 2005 at 2:23 pm
I'll go for a function which returns a table and pass in which product(s) your are interested in.
February 28, 2005 at 6:58 pm
you should start by normalising:
have a file table and a product table, then have a join table
file
----
file 1
file 2
file 3
Product
-------
A
F
W
Z
G
File_Product table
File Product
--- -------
file 1 A
file 1 F
...
file 2 A
file 2 W
...
...
From the join table you can use functions to concatonate / aggregate to produce either of your example tables.
March 3, 2005 at 4:20 pm
Thanks it worked! On the page that displays the results I select the right records from the view through a browser querystring
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply