accessing same fields in variable length record


[ Follow Ups ] [ Post Followup ] [ Message Board ]

Posted by 'Viji' on June 01, 2001 at 14:32:26 EST:

I have seen some documentation for skipping
fields in sqlloader using filler keyword.

But is there any way to access the same field
two or more times in sqlloader.

For example, my datafile looks as follows :-

student.dat contains information of student
and courses taken by student in a single line

------------------------------------------------
ssn, student_name, course1, course2, course3
------------------------------------------------
I have two tables, student and course as follows :-

student
=======
student_name, ssn

course
======
course_name, student_name

I have a control file

LOAD DATA
INTO student
FIELDS TERMINATED BY ","
(ssn, name)

INTO STUDENT
FIELDS TERMINATED BY ","
(course_name, student_name)

I don't know how to populate the student_name here
because the student_name is the second field in the
flat file which has already been parsed for
the table student, how would I get the same info
for course table ?

Can any one please give me an example ?

Thanks.
Viji



Follow Ups:



Post a Followup


Name:
E-Mail:
Subject:

Message:


[ Follow Ups ] [ Post Followup ] [ Message Board ]