Coderifous
Programmer
I have a tab delimited text file.
I have a mysql table all setup with columns described properly. SOME of the columns are of the type "SET".
Just for argument purposes, lets say the SET type columns have legal values "a","b","c","d"
When using:
load data local infile "/path/to/file" into table my_tbl;
Everthing goes in fine except for the SET type columns, they only get one of the described pieces. For instance:
if the values of the tab-delimited ( [tab] for tabs)records are like:
John Dragodirt[tab]1234 Sun Drive[tab]("a,b,d"[tab]22030
Susy Quirtenod[tab]2345 Moon Lane[tab]("b,d,a"[tab]22456
It populates the table with the two records, but the 3rd column only gets the last values... "d" and "a". How do I format the tab file so that the table will be populated properly, with the SET type columns having all legal values entered, not just the last one there?
I appreciate any help, thanks.
--Jim
I have a mysql table all setup with columns described properly. SOME of the columns are of the type "SET".
Just for argument purposes, lets say the SET type columns have legal values "a","b","c","d"
When using:
load data local infile "/path/to/file" into table my_tbl;
Everthing goes in fine except for the SET type columns, they only get one of the described pieces. For instance:
if the values of the tab-delimited ( [tab] for tabs)records are like:
John Dragodirt[tab]1234 Sun Drive[tab]("a,b,d"[tab]22030
Susy Quirtenod[tab]2345 Moon Lane[tab]("b,d,a"[tab]22456
It populates the table with the two records, but the 3rd column only gets the last values... "d" and "a". How do I format the tab file so that the table will be populated properly, with the SET type columns having all legal values entered, not just the last one there?
I appreciate any help, thanks.
--Jim