Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Posts
    38

    Unanswered: Overflow error, empty record set

    Hi!

    I'm trying to fetch a sum from a Progress database with "SELECT CEILING(ROUND(SUM(Price),0)) AS price...". This works fine if there is data to be fetched. If it finds nothing it throws me an "Overflow error (7485)".

    After a little testing I found that CEILING causes the problem. So this would work "SELECT ROUND(SUM(Price),0)..." for both empty and populated record sets. The problem is that Openedge returns two zero decimals with "Round(),0" which I thought I could get rid of with CEILING.

    Do you guys know how to deal with this?

  2. #2
    Join Date
    Feb 2010
    Posts
    38
    Sorry, I posted too fast.

    After consulting the Openedge SQL reference I found the IFNULL function.

    "SELECT CEILING(ROUND(IFNULL(SUM(Price),0),0)) AS price..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •