Make Table But With No Common Joins

M

mike

Hi. Any help with this would be fantastic. I have a table
that I'm using to create another table. The source table
basically shows all of our sales invoices by date. I'm
grouping it on territory and account, and then summing all
the prior invoice amounts like so:

Territory AccountNumber DollarsShipped
South 123 100
South 123 200

Group By Group By Sum

The problem I'm having is that I actually want to add the
months of the year each line of the results so that I, in
effect, end up with 12 of the same exact tables one on top
of the other, each with a different month of the year in
front of it, like this:

Month Territory AccountNumber DollarsShipped
1 South 123 300
2 South 123 300
3 South 123 300
4 South 123 300
etc...

I don't know how to do this because I can't figure out how
to insert a column from one table (my table of months)
that doesn't have a natural join field with another table
(my table of invoices). Any thoughts? Thanks!
 
J

John Vinson

I don't know how to do this because I can't figure out how
to insert a column from one table (my table of months)
that doesn't have a natural join field with another table
(my table of invoices). Any thoughts? Thanks!

If you have a twelve-row table of months, you actually WANT something
that's normally a mistake: a Cartesian join linking every row in the
months table to every row in your table. To get this, simply include
both tables in the query design window with no join line at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top