RE: SQL To Sum data

2001-11-19 Thread Kevin Gilchrist
Yep, need to shift that bracket to the right. -Original Message- From: Tony Schreiber [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 15:06 To: CF-Talk Subject: RE: SQL To Sum data Isn't it SUM(NVL(tbldetailentry.reghrs,0))? NVL takes two arguments, the first is the

RE: SQL To Sum data

2001-11-19 Thread Tony Schreiber
iginal 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

RE: SQL To Sum data

2001-11-19 Thread Kevin Gilchrist
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

RE: SQL To Sum data

2001-11-19 Thread Nick McClure
What is you just did SUM(ISNULL(tbldetailentry.reghrs)) Would this work? At 03:59 PM 11/19/2001 -0400, you wrote: >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

RE: SQL To Sum data

2001-11-19 Thread Costas Piliotis
Oh yeah, one more thing... I think Oracle is now Ansi-92 compliant. Try putting your join in the FROM Clause instead: SELECT SUM(tbldetailentry.reghrs) AS Daystotals FROM tblMainEntry INNER JOIN TblDetailEntry ON tbldetailentry.MainID = tblMainEntry.MainID WHERE tblDetailEntry.recorddate =

RE: SQL To Sum data

2001-11-19 Thread Angel Stewart
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

RE: SQL To Sum data

2001-11-19 Thread Bryan Love
iotis [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 11:09 AM To: CF-Talk Subject: RE: SQL To Sum data Dunno oracle well, but here's a couple of ideas: First, are there nulls in the field you're taking the sum of? This may case erratic results. Try SUM(ISNULL(tbldetail

RE: SQL To Sum data

2001-11-19 Thread Costas Piliotis
Dunno oracle well, but here's a couple of ideas: First, are there nulls in the field you're taking the sum of? This may case erratic results. Try SUM(ISNULL(tbldetailentry.reghrs),0) instead. Also, be careful with date comparisons. They don't trim off the time portion in sql server. Perhaps