How to join one query to another in sql (sql server 2000)

I have one query which returns:

DateOrder   Month
1                  Oct
2                  Nov
3                  Dec
4                  Jan
5                  Feb
6                  March

and so on until september.

I have another query which returns

Sales Visits      Month
25                    Oct
14                    Nov
16                    Jan
17                    Feb

etc.  Notice how there were no sales visits in December.  However I want the sql to return:

Sales Visits       Month
25                      Oct
14                      Nov
16                      Jan

Is this type of this possible in sql without using a view (i dont have that access)?   If so can someone please post the pseudo code how i would do this?  

Who is Participating?
Patrick MatthewsConnect With a Mentor Commented:
If you could post the SQL statements for the two predecessor queries this would be cleaner, but for now...

SELECT q2.SalesVisits, q1.Month
FROM (insert SQL for query 1 here) q1 LEFT JOIN
      (insert SQL for query 2 here) q2 ON q1.Month = q2.Month
ORDER BY q1.DateOrder
BostonMAAuthor Commented:
Excellent! It worked, thank you very much!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.