Home » RDBMS Server » Server Utilities » SQL LOADER
SQL LOADER [message #387362] Thu, 19 February 2009 00:13 Go to next message
ORAGENASHOK
Messages: 240
Registered: June 2006
Location: Chennai
Senior Member
I have a control file below and also the xls file attached i want to combine two column from xl sheet and upload the the value into one of the column in table which is mentioned in control file.

LOAD DATA
DISCARDMAX 5000
INTO TABLE EI_CASE_STATS_TMP
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'
trailing NULLCOLS
( EMP_ID CHAR(3) "LTRIM(RTRIM(:EMP_ID))",
EMP_NAME CHAR(22) "LTRIM(RTRIM(:EMP_NAME))",
AGE INTEGER EXTERNAL
)

Tell me is any way to upload the combination of first and second name value into the emp_name column of the table.
Re: SQL LOADER [message #387377 is a reply to message #387362] Thu, 19 February 2009 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Which xls file? Which first and second name?
Read http://www.orafaq.com/forum/mv/msg/138387/378713/102589/#msg_378713

Regards
Michel
Re: SQL LOADER [message #387389 is a reply to message #387377] Thu, 19 February 2009 01:48 Go to previous messageGo to next message
ORAGENASHOK
Messages: 240
Registered: June 2006
Location: Chennai
Senior Member
Thanks Michel its really helped out me ,this is what i want and also i have doubt on this post which is done by Barbara is really opt for my scenorio.

My doubt is he used to run the sqlldr as HOST

HOST SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log


Is it any diff to run the below ctl file by simply.If its really diff let me know.

SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log


OPTIONS (ERRORS=10000000)
LOAD DATA
INFILE *
APPEND
INTO TABLE TABLEA
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
FIELD1 INTEGER EXTERNAL,
FIELD2 INTEGER EXTERNAL,
filler3 BOUNDFILLER,
filler4 BOUNDFILLER,
FIELD3  "get_id (:filler3, :filler4)"
)


Re: SQL LOADER [message #387406 is a reply to message #387389] Thu, 19 February 2009 02:15 Go to previous message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You have to adapt Barbara's example to your case.
We have neither your table nor your data file so we can't do more.

Regards
Michel
Previous Topic: ORA-01502: index or partition of such index is in unusable state
Next Topic: How to load multiple files into the database using sql*loader?
Goto Forum:
  


Current Time: Mon Dec 23 20:10:54 CST 2024