--------------------------
SELECT SUM(tbldetailentry.reghrs) AS Daystotals 
        
        FROM tblMainEntry,TblDetailEntry

        WHERE 

        tbldetailentry.MainID = tblMainEntry.MainID

        AND

        tblDetailEntry.recorddate =
to_date('#currentdate#','mm/dd/yyyy')

        AND

        tblMainEntry.empid = #client.emplid#

        AND

        Attendance_Code > 8000

---------------------

Can you folks find anything wrong with this code?
The idea is to simply add up all the Hours that a particular employee
worked on a day specified by Current Date, 
where the Attendance code is greater than 8000 indicating a Vacation
day.

It sounds just perfect in theory, but in practice it totally is not
working.
It is missing out the first day, and it somehow gets ridiculous values
for the SUM.

I wonder if there is something fundamentally wrong with the SQL.

-Gel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to