
On Nov 15, 2007 4:58 PM, m h
Hello again,
I've got a column declared as such:
foo NUMERIC(9, 2),
When I try and enter NULL values into it, it gives the following error:
!SQLException:int:"" is no decimal value (doesn't contain a '.')
Now, the message itself had me confused (still does actually), but I figured out by trial that it was complaining that I was shoving a NULL value in that column. Can someone explain why a NULL value can't go it here? (There is no "NOT NULL" on the column) Also columns defined as "NUMERIC(7,0)" allow NULL values.....
Confused.....
More information. It appears that if the table is empty (or new as mine was), that column can't have a NULL value for the initial entry. After putting a row in that has a non NULL value, the NULL one will go in. This seems like a hacky workaround for me. Also, I tried explicitly defining the column as: foo NUMERIC(9, 2) NULL, (as in it takes NULLs, not NOT NULL), and I get the same behavior. Rejects initial NULL values, after non NULL value entered, NULL values go in...