G
Guest
I need to create a calculated field in a query that looks at the 'Complete
Date' and returns the quarter the deal completed. Example, if the complete
date is 2/15/05, then it completed in Q1 and the query should return 1 in
that record. Similarly if the date is 6/3/05, then 2 (the year is irrelevant
for this field). The powers that be can't look at the date and calculate the
quarter in their head so I have to do it for them in this report.
I was thinking an SQL subquery would work but I haven't a clue how to write
that.
I can code the data input form and populate the table driving the above
query but, I prefer to have the calculation in the Query because it will
catch any data changes/updates in the table (which are unlikely but may
happen). Am I barking up the wrong tree with the SQL? And if not, anyone
know how to write that?
Date' and returns the quarter the deal completed. Example, if the complete
date is 2/15/05, then it completed in Q1 and the query should return 1 in
that record. Similarly if the date is 6/3/05, then 2 (the year is irrelevant
for this field). The powers that be can't look at the date and calculate the
quarter in their head so I have to do it for them in this report.
I was thinking an SQL subquery would work but I haven't a clue how to write
that.
I can code the data input form and populate the table driving the above
query but, I prefer to have the calculation in the Query because it will
catch any data changes/updates in the table (which are unlikely but may
happen). Am I barking up the wrong tree with the SQL? And if not, anyone
know how to write that?