Isn't it SUM(NVL(tbldetailentry.reghrs,0))? NVL takes two arguments, the first is the field to check and the second is the value to return if the first is null...
> Change SUM(ISNULL(tbldetailentry.reghrs),0) > > to > > SUM(nvl(tbldetailentry.reghrs),0) > > -----Original Message----- > From: Angel Stewart [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 19, 2001 14:59 > To: CF-Talk > Subject: RE: SQL To Sum data > > > None of this ..is working and it is just not making much sense as to why > it isn't working. > > Using the SUM(ISNULL(tbldetailentry.reghrs),0) results in an error, > Wrong Number Of Arguments. > > SELECT SUM(ISNULL(tbldetailentry.reghrs),0) 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 > > > Any other ideas as to why this just won't work? Is it some problem with > the fact that it is a Join between TblMainEntry and TblDetailEntry? > > Using that standard time comparison has always worked before. > > -Gel > > -----Original Message----- > From: Bryan Love [mailto:[EMAIL PROTECTED]] > > if you don't specify a time when using to_date Oracle will use zeros > (midnight of previous day, or beginning of new day) for the timestamp. > That timestamp is part of the date so if you used Oracle's default > sysDate when inserting the record then the timestamps won't match. Try > this: > > to_char(tblDetailEntry.recorddate,'mm/dd/yyyy') = '#currentdate#' > > instead of your current date comparison (it will strip off the > timestamp). > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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

