Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Range and sum 2

Status
Not open for further replies.

jmandiaz

IS-IT--Management
Apr 22, 2001
110
US
Hey Guys,
I'm trying to find the correct syntax to do the following.
I have an employee table that holds vacation info..
I want to be able select a date range for example in Oracle SQL it would be something like
select empname,vacation_date
from emp
where vacation_date between '04-jun-01' and '04-jun-30';

I would then also like to be able to show a total hours for each employee on the same report. Any suggestions on how i can do this would be greatly appreciated it. Thanks in advance.

-Jaime
 
Something like this ?
SELECT empname,vacation_date
FROM emp
WHERE vacation_date Between #04-jun-01# and #04-jun-30#;


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi,
It may be better to create a form where the user can select the range of dates, then let the query pick the necessary records to send to the report. I wrote an FAQ on this. You can find it at: faq703-2696

HTH, [pc2]
Randy Smith, MCP
rsmith@cta.org
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top