Has anyone run into this issue before and knows how to deal with it?
Thank you in advance,
Kermit Lowry
kermit dot lowry [AT] kp dot org
create table txn(cust_id integer not null, value decimal(19,2) not
null)
in userspace1;
db2 "select * from txn"
CUST_ID VALUE
----------- ---------------------
1 10.20
db2 export to k.del of del "select * from txn"
cat k.del
1,+00000000000000010.20
perl -pe 's/\+0+([1-9]\d*\.\d*)/$1/g;' k.del
1,10.20
> Hello! The issue I am having is that when I export a decimal column
> out of DB2 UDB 8.1.5 I get a "+" and leading zeros to round out the
> field (see example below). I have a quick and dirty perl one-liner to
> fix this, but even after scouring the export documentation and
> searching the web, I cannot find a parameter to turn this off (except
> to get rid of the +). I did see a "db2 values cast" command but it is
> not very well documented either.
The number format in the file is still valid; are you having a problem
moving the data to another DBMS? EXPORT is a data movement utility,
not a reporting utility. If you want/need your data in a specific format,
consider using a different tool like QMF or some other reporting tool.
(Or use your perl script to reformat).
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Thanks,
Kermit
Ian <ian...@mobileaudio.com> wrote in message news:<405992cb$1...@corp.newsgroups.com>...
use the 'modified by decplusblank' filetype-mod option to remove the "+"
sign.
For the leading zeros haven't i a solution.
Regards / Gruß
----------------------------------
Stefan M. Mihokovic
email: st...@stemi.de
----------------------------------
Again thanks,
Kermit
"Stefan M. Mihokovic" <ne...@stemi.de> wrote in message news:<c3ehgc$pir$00$1...@news.t-online.com>...
PM
001
002
004
006
012
representing say months but must be three digits long ? I tried using
decimal, digits etc but couldnt get rid of the decimal character or I
ended up with a text string "001" etc.
Any ideas on how this could be exported as a numeric value with
leading zeros ? The value in the table to be exported is an integer.
use the 'modified by decplusblank striplzeros' filetype-mod option to remove
the "+" sign and the leading zeros.