I have a type record defined, using heroine utl function i want to read the line of data from a file and put the data into type record. Type record has got multiple variables declared under it.
You are a little on detail, but let's say you read a line from the varchar2 that looks like:
CONNORMCDONALD
To add this to a record which is:
record MY_REC is
( fname varchar2(20),
lname varchar2(20)
)
it would look something like
declare
record MY_REC is
( fname varchar2(20),
lname varchar2(20)
)
l_rec my_rec;
begin
l_rec.fname := substr(file_line,1,6); -- CONNOR
l_rec.lname := substr(file_line,7); -- MCDONALD (rest of line
end;
Plenty of examples on this site of how to *parse* a single line into multiple fields (eg comma separated etc) if you need do that as well