DBLOAD and Decimal values
Posted in 1994
In Message-Id: <3c2q2t$74m@darkstar.UCSC.EDU>
smiths@am.ucsc.edu (William Wesley Gray) writes:
> I am trying to load some flat-file data into an Informix database with
> DBLOAD and have run into a problem. If a field is defined like this:
>
> DECIMAL (6,2)
>
> and the data meant for that field is like this:
>
> 123456
>
> without an explicit decimal point, then DBLOAD treats that data as if
> it was 123456.00 instead of 1234.56 like I want it to. Editing the
> flat-file beforehand to insert the decimal is not an option for me.
> Any ideas? Informix support suggested to make a temporary field to
> load the data into and then a trigger to covert it and store it into
> the correct field. I would prefer a simpler solution.
>
> Also, do Sybase and/or Oracle handle this situation better than Informix?
>
> Thanks for any help,
>
> -Wes
dbload is a very "rough" method for just slamming in data that's supposed to
be absolutely good. That means putting data that you just unloaded back
into tables. Any time you want to do things like error checking, verifying,
updating, writing record-oriented log files of what went on, and such you
need to use a program.
We are dbloading huge amounts of new data that comes from a process
controller (that is supposed to be "clean") and finding more and more that
we should have used a program with some smarts to keep up with the data.
The 4gl to load data is trivial to write and will pay back many times
over the investment in time to write and time to run.
"Good judgement is the product of experience.
Experience is the product of bad judgement."
-I don't know who wrote it
good luck,
__________________________________________________________________
| Clem Akins Standard Disclaimers Apply |
|Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" |
| Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com |
|________________________________________________________________|