[Dbi-interbase-devel] numeric data and place holders
Status: Beta
Brought to you by:
edpratomo
From: swade <sw...@di...> - 2001-10-10 18:07:34
|
Hi, I've noticed some funny stuff about handling some numeric or decimal data. perl5.6.1 interbase (latest), dbi,dbd (latest) I have a field numeric(4,2) If I use place holders to update the data with a number like 1.03 it will update. If I update using .03 it will insert a 0. I switched from using placeholders on that field to number='$value' and it updated correctly. Same results using a decimal field, etc Also id have to actually write it down because I can't remember the issues at the moment but depending on how a table or view,etc is setup, a field with a value of say .06 for instance will be pulled as .60 I believe its in a case where you might have a raw data table then a view which sums up the data, and you then pull the data without cast(sum(field) as numeric(4,2)) for instance. Sorry I can't give any more info on this one..my brain frys everytime I try to figure out the conditions it happens under so I just cast everything now to make sure I don't miss something. Has anyone noticed this? seems to happen using group by or a view with sum. Ibconsole pulls all of these correctly. thanks, shawn |