If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Overflow error, empty record set

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-14-10, 01:23
tosa tosa is offline
Registered User
 
Join Date: Feb 2010
Posts: 35
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?
Reply With Quote
  #2 (permalink)  
Old 04-14-10, 01:44
tosa tosa is offline
Registered User
 
Join Date: Feb 2010
Posts: 35
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..."
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On