Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

query for transaction date in an accounting periods

Posted on 2014-01-08
1
Medium Priority
?
229 Views
Last Modified: 2015-02-11
I have a Period table that has the Accounting periods (start date & end date) along with a PeriodID for the period - 1 for Jan, 2 for Feb etc.

The periods are set up on a 4-4-5 week schedule so the dates do not correspond to beginning and end of each month.

I have a transaction table that has a transaction date filed.  I would like to make a query that will look at the date in the transaction table and find which period it belongs in then put that periodID in a column in the results.

Any suggestions?

Thanks for your help.
0
Comment
Question by:johnmadigan
1 Comment
 
LVL 52

Accepted Solution

by:
Gustav Brock earned 2000 total points
ID: 39766041
You can use:

Select
  Transaction.*,
  Period.*
From
  Transaction,
  Period
Where
   Transaction.Date Between Period.StartDate And Period.EndDate

/gustav
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question