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