View Single Post
  #1 (permalink)  
Old October 31st, 2005, 03:20 PM
Ford Ford is offline
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combining Queries or results from 2 queries

I was wondering is it possible to combine the results
from two different queries?

My example is simpler than reality but I wanted to get my ideas across.

Within a single SPROC:
My first query grabs a date range(let's say, 01/05 - 10/05)
and it grabs all books sold in the fiction department

My second query grabs a date range(let's say, 01/05 - 10/05)
and it grabs all books sold in the non-fiction department.

I want to combine the columns from the different queries and have
them link up based upon the common factor... this being the date range.

There are possibilities that no books were sold during a particular month, and thus would not pull back a record for that month, making the number of rows different from query 1 and query 2.

Any and all ideas are appreciated.

Thanks.
Reply With Quote