llmclaughlin
Programmer
The file I'm reading has 3 columns comma seperated, the below code never gets the last record 3rd column always exit. The one that has KIT_TYPE. If my file has 25 rows it gets all information for 24 rows fine and get the plate_name and fedex_barcode for the 25 record.
Any help.
LOOP
DBMS_APPLICATION_INFO.set_client_info (l_last || ' of ' || l_size);
l_current :=
DBMS_LOB.INSTR (l_bfile,
l_comma,
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.PLATE_NAME :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
l_current :=
DBMS_LOB.INSTR (l_bfile,
l_comma,
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.FEDEX_BARCODE :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
l_current :=
DBMS_LOB.INSTR (l_bfile,
'0A',
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.KIT_TYPE :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
Thanks
Louie
Any help.
LOOP
DBMS_APPLICATION_INFO.set_client_info (l_last || ' of ' || l_size);
l_current :=
DBMS_LOB.INSTR (l_bfile,
l_comma,
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.PLATE_NAME :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
l_current :=
DBMS_LOB.INSTR (l_bfile,
l_comma,
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.FEDEX_BARCODE :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
l_current :=
DBMS_LOB.INSTR (l_bfile,
'0A',
l_last,
1);
EXIT WHEN (NVL (l_current, 0) = 0);
l_rec.KIT_TYPE :=
UTL_RAW.cast_to_varchar2 (
DBMS_LOB.SUBSTR (l_bfile, l_current - l_last, l_last));
l_last := l_current + 1;
Thanks
Louie