473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need help querying previous quarter information

1
I am trying to set up a query that automate pulling the previous quarters data.

I have an expression field that changes Date() in to a month only(1-12)
Expand|Select|Wrap|Line Numbers
  1. MonthNo: DatePart("m",[Current Date])
.

Then is another field that querys a table I have tried several criteria statement, this being the most recent
Expand|Select|Wrap|Line Numbers
  1. IIf([MonthNo] Between 1 And 3,"4th")
. I will then use some or statements to find the other three quarters.

Needless to say this is not working nor is about 25 other iterations. I have even put the first calculation in its own table, which works, but I had trouble link this table with the rest of the query.

Any help would be great. I am under the gun to get this competed ASAP since I will be taking a 1yr. military leave of abscence.
Feb 14 '07 #1
4 3672
Rabbit
12,516 Expert Mod 8TB
Would it not be more to the point if you just went straight to quarter instead of going through month?

Qtr: DatePart("q", [Current Date])
Feb 14 '07 #2
NeoPa
32,556 Expert Mod 16PB
Don't be smart Rabbit ;)
I'm sure they would have if they'd known about it.
Feb 15 '07 #3
Rabbit
12,516 Expert Mod 8TB
Don't be smart Rabbit ;)
I'm sure they would have if they'd known about it.
I wasn't NeoPa =P
It may be that he needs month information as well.
Feb 16 '07 #4
NeoPa
32,556 Expert Mod 16PB
I was just pulling your chain Rabbit :D
It was a good point anyway.
Feb 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Matt | last post by:
Hello, I have a query that I would like to schedule in DTS. The criteria of this query checks for records in the table that are within the current quarter. Here is what I have. WHERE...
1
by: Terencetrent | last post by:
I have created a query that examines qarterly sales for 5 regions in the country. The query contains data for the past 6 quarters for each region and calculates the perecentage of total sales for...
11
by: Larry | last post by:
I will be teaching an eCommerce application development course using ASP.Net after many years of having taught classic ASP. (Course was interrupted by 18 months in the Middle East with my Army...
3
by: RD | last post by:
Say Company's financial year starts October First and say we are now March 17th. How do you determine which quarter of the Financial year - not the actual year - March 17th is in. Thanks for any...
4
by: dmeiser | last post by:
Hello all: I need to query a table for events that happen on third shift ( 11 PM to 7 AM ) in a date range. In the past, I've only needed to query for one night, but I now need to query for 14...
7
by: tman | last post by:
I am generating a very large tree list in my program and while it's performance is great once loaded it takes a really long time to load. I create a root TreeNode "offline" and go through the...
3
by: noellieb | last post by:
I have class project and was asked to design 2 classes. 1 : Class Coin designated by coin type (PENNY, NICKEL, DIME, QUARTER OR DOLLAR) 2: Create Class CoinChanger To allow coin changing : say if...
3
by: RZ15 | last post by:
Hi, I have a query that calculates the sum of branch transfers for the current quarter. Here is my Quarter-to-Date field: QTD-In: Sum(CCur(IIf(="TRN" And Between...
4
by: gimme_this_gimme_that | last post by:
Is there a way to get the last day of the previous business quarter from DB2? For 10/21/2008 the day would be 9/30/2008. Thanks.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.