Re: DB2 : IMPORT FILE , data modification

Re: DB2 : IMPORT FILE , data modification

 

  

cant you put a macro in the spread sheet to strip it off before you create
the csv






"Nambiar.Dheeraj "
<db2udbdba-ezmlmshield-x92569045.[Email address protected]
01/24/2008 03:45 PM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
DB2 : IMPORT FILE , data modification






All Gurus,

I am trying to load a CSV file from my PC (windows XP) to Db2 v8.1 (UNIX
server). The file is an excel sheet (user input) converted to a CSV. I
am able to load the file to the table but the problem I am facing is
that there is a amount field in the input which has values like '$10000
'and I need the data to be numeric for my application, is there a way I
can put a some logic to remove the '$' and load just the numeric data.


-------Code being used ----

IMPORT FROM 'C:/data/DD Limits Dec 2007.csv' OF DEL COMMITCOUNT
AUTOMATIC
SKIPCOUNT 2
MESSAGES c:/data/import_dd_limits.log
REPLACE INTO DDN.DD_LIMITS
(Region,Pricing,Name,Account,Amount);

-----------------
I am very new to DB2 so don't have any Idea what I should be looking at,
I tried searching the documentation but couldn't find any thing good,
any help in this direction would be great.

Thanks in advance-
-Raj



LEGAL DISCLAIMER
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or other
use of or taking action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you have
received this email in error please contact the sender and delete the
material from any computer.

SunTrust and Seeing beyond money are federally registered service marks of
SunTrust Banks, Inc.
[ST:XCL]






---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



DB2 & UDB email list listserv db2-l LazyDBA home page