0

Hi all, I am facing some error on the database:

I declare a field in my database as VARCHAR(50), and i try to modify it to INTEGER(50), However i get this:

ERROR 1264 (22003): Out of range value adjusted for column 'MP1T' at row 2

And the field with data is as shown below:

+------+
| MP1T |
+------+
| 1    |
|      |
| 4    |
|      |
| 7    |
|      |
|      |
| 33   |
| 0    |
|      |
| 2    |
| 2    |
| 3    |
| 0    |
|      |

Because it contains nothing at row2, i try to declare as not null but fail. Anyone? Thanks

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by ericstenson
0

You might have to post this in the database forum, but why are you specifying INTEGER(50)? Shouldn't it just be a datatype INTEGER?

I mean, an Integer is a whole number. So "1" is just "1", not 1.0000.... therefore, I don't think INTEGER(50) makes any sense. Moreover, an INTEGER type in SQL server has a range of +/- 2147483647. Again, no size is specified like CHAR(X), VARCHAR(X), etc.

Try it and see if it works! Can't hurt!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.