alwayshouston
MIS
Hi All!
I have a table in below format:
Dept_ID Expenses Date
ACCTING 12000000 6/30/2000
ACCTING 10000000 7/31/2000
ACCTING 20000000 8/31/2000
ACCTING 30000000 9/30/2000
ACCTING 50000000 10/31/2000
ACCTING 60000000 11/30/2000
ACCTING 70000000 12/31/2000
ACCTING 10000000 1/31/2001
......
......
......
ACCTING 20000000 12/31/2003
I would like to write a query that would give me an output based on either Quarterly basis or Semi Annual basis or Annual basis from the date that the user selected. When the query is executed it would ask for the parameter of selection of records on Quarterly or Yearly or Semi Annually. For example, if the user selects date of 7/31/2000 and input quarterly in the parameter, it would return following:
ACCTING 10000000 7/31/2000
ACCTING 50000000 10/31/2000
ACCTING 10000000 1/31/20001
If the users select date of 7/31/2000 and select Yearly, it would return the following:
ACCTING 10000000 7/31/2000
ACCTING 90000000 7/31/2001
ACCTING 70000000 7/31/2002
ACCTING 40000000 7/31/2003
How could I write a query that would give me above output. I tried using DateDiff("q",[Date]) function but it does not give the right output.
Any help or feedback is appreciated!
Thanks in Advance!!!!
I have a table in below format:
Dept_ID Expenses Date
ACCTING 12000000 6/30/2000
ACCTING 10000000 7/31/2000
ACCTING 20000000 8/31/2000
ACCTING 30000000 9/30/2000
ACCTING 50000000 10/31/2000
ACCTING 60000000 11/30/2000
ACCTING 70000000 12/31/2000
ACCTING 10000000 1/31/2001
......
......
......
ACCTING 20000000 12/31/2003
I would like to write a query that would give me an output based on either Quarterly basis or Semi Annual basis or Annual basis from the date that the user selected. When the query is executed it would ask for the parameter of selection of records on Quarterly or Yearly or Semi Annually. For example, if the user selects date of 7/31/2000 and input quarterly in the parameter, it would return following:
ACCTING 10000000 7/31/2000
ACCTING 50000000 10/31/2000
ACCTING 10000000 1/31/20001
If the users select date of 7/31/2000 and select Yearly, it would return the following:
ACCTING 10000000 7/31/2000
ACCTING 90000000 7/31/2001
ACCTING 70000000 7/31/2002
ACCTING 40000000 7/31/2003
How could I write a query that would give me above output. I tried using DateDiff("q",[Date]) function but it does not give the right output.
Any help or feedback is appreciated!
Thanks in Advance!!!!