struggling to figure out how to read certain values from a csv file. Help would be appreciated.
INPUT VALUE FROM cFilePath.
REPEAT:
CREATE ttTable
IMPORT DELIMITER ","
END.
OUTPUT CLOSE.
struggling to figure out how to read certain values from a csv file. Help would be appreciated.
INPUT VALUE FROM cFilePath.
REPEAT:
CREATE ttTable
IMPORT DELIMITER ","
END.
OUTPUT CLOSE.
The main issue in your sample code is that you are not specifying a place to put the data being read by IMPORT. One possible solution:
INPUT FROM VALUE( cFilePath ). /* FROM and VALUE were in the wrong order */
REPEAT:
CREATE ttTable
IMPORT DELIMITER "," ttTable. /* read the data into the ttTable record that you just created */
END.
INPUT CLOSE. /* this used to say "OUTPUT: :( */