Jump to content

out of range


alhena

Recommended Posts

I have several columns in my table (int and decimal) that are restricted to a specific range (for example from 0 to 99.99). With a previous version of MySQL, I used to run a single query that would update these fields without checking what the actual number was, in order to minimize the amount of queries needed. If something was at 99.99 for example, and the query wanted to add 1, it stayed at 99.99, while the rest of the query would still get updated.

 

Now I have MySQL 5.0.51a, and I'm getting an "out of range" error for the same queries. If one of the values is lower or higher than the allowed range, it will abort the entire query.

 

Is there a way to tell MySQL to ignore the "out of range" and work as it previously did? Or do I have to pull all the data from the table first, have all the values checked, and selectively only update those that allow updating? Or is there another easier workaround?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.