|
-
Nov 30th, 2006, 10:54 AM
#1
Thread Starter
Addicted Member
[Resolved]how to get current the next 2 quartes?
hi all,
my sql database has dates in this format:
Q106 Q206 Q306 Q406 Q107 Q207 Q307 Q407
how can extract data based on the Current and the Next Two Quarters dynamically (Q406, Q107, Q207) ?
any tips are appreciated.
waely
Last edited by waely; Dec 4th, 2006 at 02:16 PM.
-
Dec 2nd, 2006, 01:44 AM
#2
Re: how to get current the next 2 quartes?
how are you storing the date values, I mean in which data type. and how do u say current quarter is Q406, is there any logic you have for the continuous quarter numbers...
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Dec 2nd, 2006, 06:56 PM
#3
Thread Starter
Addicted Member
Re: how to get current the next 2 quartes?
the dates are stored in date format. I meant the fields names are called Q106,Q206 etc... but the data type is date.
thanks
-
Dec 4th, 2006, 02:52 AM
#4
Re: how to get current the next 2 quartes?
You mean, you are storing the dates in different fields itself...strange..but anyhow...to get for 1 quarter then use something like this in your sql statement...
VB Code:
....Where Q106 IS NOT Null
'or
....Where IsNull (Q106) = False
Im assuming for the other quarters this column will be null otherwise you can use Q106 <> ""
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Dec 4th, 2006, 09:25 AM
#5
Thread Starter
Addicted Member
Re: how to get current the next 2 quartes?
dear ganeshmoorthy. I think we have misunderstanding so let me explain in more details. my table has about 25 fields. Project _D is one of them and also date fields which start from (2004) Q104 -----> (2017)Q417
these fields are in Date format and all have data in them. my problem is to dynamically check for current system date, figure out which quarter we're in then display it along with the next three quarters. for example if I run my report today I should get Q406 and also the next three quartes Q107,Q207,Q307.
hope this is clear.
thanks for your help
-
Dec 4th, 2006, 11:09 PM
#6
Re: [Resolved]how to get current the next 2 quartes?
Waely, Could you post some sample values stored in the Datefields...and the name of the fields
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Dec 5th, 2006, 08:59 AM
#7
Thread Starter
Addicted Member
Re: [Resolved]how to get current the next 2 quartes?
sorry to waste your time but specification for the report has changed and I don't need to do my report this way.
thank you for your attempts to help me.
-
Dec 5th, 2006, 12:56 PM
#8
Re: [Resolved]how to get current the next 2 quartes?
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|