Solved

query for transaction date in an accounting periods

Posted on 2014-01-08
1
209 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 49

Accepted Solution

by:
Gustav Brock earned 500 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

822 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