Hi e'body,
I have got into something interesting..
I am presently working on DB2 tables created by somebody else...
I have a column in a table which has something like 1234, but he declared it
as VARCAHR(255) ??? i do not know why.. hmm !!! maybe he ....
and i was thinking of changing it to NUMERIC(4,0) OR VARCHAR(4)..
It really does not let me do it..
Ok, i thought let me play with
java code..
firstly i wanted to change it because, look when i query, and when i have something like resultSet.getString(1) where it should return a
String it returns a String but like ( "1234 ); there is no closing double quote... hmmm interesting... so when i perform Integer.parseInt( returned String) .. throws a NumberFormatException; ohh my gosh.. some bug here??
I noticed the value "1234 and not "1234" when i was debugging...
kind of interesting...
maybe we can discuss about it.. something like a bug ...
Thanks
PS: If possible you guys can help me why it is giving problem when i am altering the table, i used :
"ALTER TABLE CASES ALTER COLUMN CSCODE SET DATA TYPE NUMERIC(4,0) "
does not let me, i also tried
"ALTER TABLE CASES ALTER COLUMN CSCODE SET DATA TYPE VARCHAR(4) "
WHICH GIVES AN ERROR SAYING..
ERROR: [SQL0952] Processing of the SQL statement ended. Reason code 10.
[ September 16, 2004: Message edited by: Bear Bibeault ]