Access query help needed

graedus

Registered User.
Local time
Today, 03:05
Joined
Feb 21, 2003
Messages
11
Hi. I'm sure this is very simple, but I certainly haven't been able to figure it out.

I have two tables:

PRODUCTS
Name
(irrelevant fields)

VENDORS
Name
(irrelevant fields)

I'd like to create a query that will produce a row for every possible combination. That is, I'd like the returned set to look like this:

Code:
Vendor1        Product1
Vendor2        Product1
Vendor3        Product1
Vendor1        Product2
Vendor2        Product2
Vendor3        Product2
and so on. Ideally, I'd like the information returned stored in a new table along with a Price field. Is this possible?
 
SELECT Table1.Name, Table2.Name, Table2.Price
FROM Table1, Table2
ORDER BY Table1.Name, Table2.Name;

Given Table1 is vendor, Table2 is products
 
You're a beautiful human being.
 

Users who are viewing this thread

Back
Top Bottom