Replicate a field based on unjoined tables

I have two tables (table a) has data like this

Jan
Feb
Mar

(table b) has data like this

10/15/2008
10/5/2008
1/1/2009
12/15/2009

I need a query that gives me the following results

Year  |  Month
2008     Jan
2008     Feb
2008     Mar
2009     Jan
2009     Feb
2009     Mar

I'm OK on parsing the date from table A  and grouping the years in table B, but I'm not sure how to join them.  The idea is that when a 2010 record is added (in the beginning of 2010) I get...

2008  Jan
2008  Feb
2008  Mar
2009  Jan
2009  Feb
2009  Mar
2010 Jan
2010 Feb
2010 Mar

and so on.. thanks in advance
jclemoAsked:
Who is Participating?
 
BinuthConnect With a Mentor Commented:

select * from
(select mnt from TableA) as TabA,(select DISTINCT YEAR(dt) as dtYear from TableB) as TabB
0
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.