Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

insert data Sqlloader to oracle table using specfied format

selvi mJan 24 2022 — edited Jan 24 2022

Hi Team,
in SQL loaded that dat file contains the data as below format
1111320220124
1121420220124
Table structure
CREATE TABLE tmp_order(id number,sid number,exp_date date );
SQLLOADER CTL FILE
LOAD DATA
REPLACE
INTO TABLE tmp_order
TRAILING NULLCOLS
(
ID POSTION(1:3) INTEGER EXTERNAL(3),
SID POSTION(4:5) INTEGER EXTERNAL(2),
EXP_DATE POSTION(6:13) INTEGER EXTERNAL(8)
)
while load data into table look like below format
id sid exp_date
111 13 2022-01-24 00:00:00
112 14 2022-01-24 00:00:00
kindly help me how to create the ctl file and load the data as above format

Thanks

This post has been answered by Frank Kulash on Jan 24 2022
Jump to Answer

Comments

Processing

Post Details

Added on Jan 24 2022
6 comments
221 views