Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

db2 load

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jrthor2 - 20 Jun 2006 19:05 GMT
I have a shell script I am trying to run that loads a table from
control file.  The file I am trying to load is delimited by the "}
character.  How do I set the delimeter code?  Here is my loa
statement:

db2 load client from /loadspace/re000000.txt of del replace int
INET.INSRP_SURP_PROP_TBL nonrecoverable

To be even more explicit, I am trying to replicate the below oracl
load command in DB2:

OPTIONS(ERRORS=10)
LOAD DATA
INFILE '/loadspace/re000000.txt'
BADFILE     '/home/prgyw1/re000000.bad'
DISCARDFILE '/home/prgyw1/re000000.dsc'
REPLACE
INTO TABLE INSRP_SURP_PROP_TBL
(
insrp_prop_addr TERMINATED BY '}',
insrp_prop_cty TERMINATED BY '}',
insrp_prop_st TERMINATED BY '}',
insrp_prop_zip TERMINATED BY '}',
insrp_prop_sub_catg TERMINATED BY '}',
insrp_prop_sq_footage TERMINATED BY '}' OPTIONALLY ENCLOSED BY '.',
insrp_prop_nbr TERMINATED BY '}',
insrp_prop_stat TERMINATED BY '}',
insrp_prop_srp TERMINATED BY WHITESPACE

Thanks

--
jrthor
Shashi Mannepalli - 20 Jun 2006 20:51 GMT
If the INPUT file is a del file type { then you use this syntax

db2 "load from <file> of <type> modified by chardel{ insert/replace
into <table>
      nonrecoverable"

cheers...
Shashi Mannepalli

> I have a shell script I am trying to run that loads a table from a
> control file.  The file I am trying to load is delimited by the "}"
[quoted text clipped - 32 lines]
> jrthor2's Profile: http://www.dbtalk.net/m455
> View this thread: http://www.dbtalk.net/t314419
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.