Hi --
I'm loading large text file of high school students into MySQL, but the school itself is only identified in the first line of each text file. Like so:
897781234Metropolitan High
340098 1001X 678 AS Reading 101KAS DOE KEITH A1 340089 A 7782...
Using SQL code, how can I generate a column of the school number (e.g., 897781234) in the first column of the receiving table so that the school will be identified with each row?
To load the text files, I'm using:
LOAD DATA INFILE "f:/school_files/school897781234.txt"
INTO TABLE my_table FIELDS TERMINATED BY ''
IGNORE 1 LINES;
Thanks!