Hi there, I have what I think is a simple question, but I do not know how to write the join statement.
I have two tables:
1) tbl_Customers with the following fields:
Customer_ID Customer_StartDate
123 3/1/2009
224 2/1/2009
2) tbl_Quarters with the following fields:
Quarter_ID Quarter_Months
Q0 0
Q1 3
Q2 6
I am trying to write a query with the following results:
Customer_ID Customer_StartDate Quarter Quarter_Date
123 3/1/2009 Q0 3/1/2009
123 3/1/2009 Q1 6/1/2009
123 3/1/2009 Q2 9/1/2009
224 2/1/2009 Q0 2/1/2009
224 2/1/2009 Q1 5/1/2009
224 2/1/2009 Q2 8/1/2009
I am not permitted to use a function. Also, the solution needs to be written in SQL - the query is much more complex than this and I am beyond using the query builder. I know how to use the dateadd function, I just can't figure out how to write my FROM clause.
Any help is greatly appreciated!!!
I have two tables:
1) tbl_Customers with the following fields:
Customer_ID Customer_StartDate
123 3/1/2009
224 2/1/2009
2) tbl_Quarters with the following fields:
Quarter_ID Quarter_Months
Q0 0
Q1 3
Q2 6
I am trying to write a query with the following results:
Customer_ID Customer_StartDate Quarter Quarter_Date
123 3/1/2009 Q0 3/1/2009
123 3/1/2009 Q1 6/1/2009
123 3/1/2009 Q2 9/1/2009
224 2/1/2009 Q0 2/1/2009
224 2/1/2009 Q1 5/1/2009
224 2/1/2009 Q2 8/1/2009
I am not permitted to use a function. Also, the solution needs to be written in SQL - the query is much more complex than this and I am beyond using the query builder. I know how to use the dateadd function, I just can't figure out how to write my FROM clause.
Any help is greatly appreciated!!!