sql*loader [message #487022] |
Wed, 22 December 2010 01:18  |
zodiacsom
Messages: 37 Registered: December 2009 Location: pune
|
Member |
|
|
i have source file contain only one value ,how i can define
position in control file
if say that file start at 6 and at 7 filler ($) and then rest of
data.
So i want only value at 6th position
in ctl file
application_code position(6) char(1)
show error ..
how should i difine position in ctl ... please help
|
|
|
|
Re: sql*loader [message #487030 is a reply to message #487025] |
Wed, 22 December 2010 01:25   |
zodiacsom
Messages: 37 Registered: December 2009 Location: pune
|
Member |
|
|
sure ..
source file
10$somnath$d$2004-12-2
20$rajiv $c$2004-12-5
ctl file
i need only d and c in my table test.
starting at positon 12
please tell me how to wirte in control file to get only d/c
table test ( creadit varchar2(1));
[EDITED by LF: applied [pre] tags]
[Updated on: Wed, 22 December 2010 04:54] by Moderator Report message to a moderator
|
|
|
Re: sql*loader [message #487056 is a reply to message #487030] |
Wed, 22 December 2010 04:57  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Control file:LOAD DATA
INFILE *
REPLACE
INTO TABLE test
FIELDS TERMINATED BY "$"
(credit position(12:12))
BEGINDATA
10$somnath$d$2004-12-2
20$rajiv $c$2004-12-5
Loading session and the result:SQL> $sqlldr scott/tiger@ora10 control=test.ctl log=test.log
SQL*Loader: Release 10.2.0.1.0 - Production on Sri Pro 22 11:56:20 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 1
Commit point reached - logical record count 2
SQL> select * from test;
C
-
d
c
SQL>
|
|
|