Loading Fixed Length Data
FLAT FILE:
1 Nani CSE Final A+
2 Indra Kanth ECE Final B
3 Kalyan CSE Third A
4 Praveen IT Third B
5 Badra ECE Final B+
6 Kali EEE Second C
7 Siri Giri E&I First D
8 Sravan MCA Third A
9 Pradeep MCA Second D
10 Joe-Rohith CSE Third D+
CONTROL FILE:
load data
infile '/bin/flat_file_fixed.txt'
append into table student_data
(
Sno position(1:1) char(2),
sname position(4:14) char(11),
branch position(16:18) char(3),
year position(20:25) char(6),
grade position(27:28) char(2)
)
Staging Table:
create table stu_data(sno number,
sname varchar2(20),
branch varchar2(10),
year varchar2(10),
grade varchar2(3)
)
This comment has been removed by the author.
ReplyDelete