Hey all, I (my boss actually) has run across a problem using perl with DB2 that i have no good answer for. Running a SELECT query thats grabs some data that includes a column defined as DECIMAL(14). When the $handle->fetchrow_array() occurs, we get the following error:
DBD::DB2::st fetchrow_array failed:
IBMCLI DriverDB2/SUN64 SQL0413N Overflow occured during numeric data type conversion. SQLSTATE=22003
My initial guess was that the 14 digit decimal is too big for perl, but i dont think so.
I have never encountered dealing with data retrieval errors, just with execute() errors. Any insight into dealing with this would help. I've also had some (seemingly) inconsistent behaviour with toggling the RaiseError flag on the DB connection, and trying to trap errors with eval{}.
Sorry if this sounds a bit disoriented, i feel a bit disoriented about this. If you need more info, please ask.
I have a lot of experience with DBD::MySQL, but have almost no experience with DBD::DB2 so i'm a bit lost.
Regardless, that may have nothing to do with this.
Update:
Reading O'Reilly's Programming the Perl DBI, i see in Appendix B, section DBD::DB2 (page 246 in my copy), the stateemnt
notice that DB2 supports numbers outside the typicalvalid range for perl numbers. This isn't a major problem because DBD::DB2 always returns all numbers as strings.