SQL Database Select

By Mo_bond ·
Hi I'm new to mySQL. I have managed to use LOAD DATA INFILE to populate a table (say table 'names') with the contents of a text file (tab delimited). The file has contains three cols (e.g. id, f_name, s_name) and one record (01, John, Smith).

The Load works when I have one record in the '.txt' file, when I try a multiple record file and then perform a Select * the returned table is not aligned correctly, e.g. the contents of field 'f_name' appear in 's_name'.
Can you load a multi record file using the LOAD DATA INFILE statement? If so, how?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

It's only a guess

by Tony Hopkinson In reply to SQL Database Select

but, I'd suggest it's a file format problem.
For instance a tab after the s_name column.
If this is just a one off to get data in then persevere, but there were more than a few problems last time I looked with this facility.
Particularly in terms of security and replication.

Related Discussions

Related Forums