Solved

query for transaction date in an accounting periods

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now