-- Created on 2011/12/10 by WSQ
declare
T VARCHAR2(8000);
S VARCHAR2(8000);
begin
-- Test statements here
T := '1.08998,1.23432;2.456,2.1;3.34543,3.678979;4.099,4.567567;';
IF (T IS NOT NULL) AND (LENGTH(T) > 0) THEN
WHILE INSTR(T, ',') > 0 LOOP
S := TRIM(SUBSTR(T, 1, INSTR(T, ';') - 1));
IF LENGTH(S) > 0 THEN
DBMS_OUTPUT.PUT_LINE('S:' || S);
DBMS_OUTPUT.PUT_LINE('V_ROADSEG_ID:' ||SUBSTR(S, 1, INSTR(S, ',', 1, 1) - 1));
DBMS_OUTPUT.PUT_LINE('V_ROADSEG_INDEX:' ||SUBSTR(S, INSTR(S, ',', 1, 1) + 1));/*
INSERT INTO T_ROADSEG_POINTS
(ROADSEG_POINTS_ID, ROADSEG_ID, LON, LAT)
VALUES
(SNT_ROADSEG_POINTS.NEXTVAL,
V_ROADSEG_ID,
SUBSTR(S, 1, INSTR(S, ',', 1, 1) - 1),
SUBSTR(S, INSTR(S, ',', 1, 1) + 1));*/
END IF;
T := SUBSTR(T, INSTR(T, ';') + 1);
END LOOP;
END IF;
end;
declare
T VARCHAR2(8000);
S VARCHAR2(8000);
begin
-- Test statements here
T := '1.08998,1.23432;2.456,2.1;3.34543,3.678979;4.099,4.567567;';
IF (T IS NOT NULL) AND (LENGTH(T) > 0) THEN
WHILE INSTR(T, ',') > 0 LOOP
S := TRIM(SUBSTR(T, 1, INSTR(T, ';') - 1));
IF LENGTH(S) > 0 THEN
DBMS_OUTPUT.PUT_LINE('S:' || S);
DBMS_OUTPUT.PUT_LINE('V_ROADSEG_ID:' ||SUBSTR(S, 1, INSTR(S, ',', 1, 1) - 1));
DBMS_OUTPUT.PUT_LINE('V_ROADSEG_INDEX:' ||SUBSTR(S, INSTR(S, ',', 1, 1) + 1));/*
INSERT INTO T_ROADSEG_POINTS
(ROADSEG_POINTS_ID, ROADSEG_ID, LON, LAT)
VALUES
(SNT_ROADSEG_POINTS.NEXTVAL,
V_ROADSEG_ID,
SUBSTR(S, 1, INSTR(S, ',', 1, 1) - 1),
SUBSTR(S, INSTR(S, ',', 1, 1) + 1));*/
END IF;
T := SUBSTR(T, INSTR(T, ';') + 1);
END LOOP;
END IF;
end;