Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot view imported data.

Status
Not open for further replies.

JohnnyAlpha

Programmer
Sep 10, 2003
12
MT
Hi,

I have created a db called test and a table called temp_table. Here it is..

mysql> describe temp_table;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| Number_1 | varchar(10) | | | | |
| Number_2 | varchar(10) | | | | |
| Number_3 | varchar(10) | | | | |
| Number_4 | varchar(10) | | | | |
+----------+-------------+------+-----+---------+-------+
4 rows in set (0.02 sec)

Now I have used a text file called temp_table.txt to import the data into this table as follows:

C:\mysql\bin>mysqlimport test temp_table.txt

all the text file has are the followig:
'1','2','3','4'

When I run the above I get an all OK it seems...

test.temp_table: Records: 1 Deleted: 0 Skipped: 0 Warnings: 4

Thing is that when I review the table I cannot seem to find the actual values of the fields. How can these be viewed ?

Thanks and advanced.

John
 
The problem is that MySQL's default field delimiter is a tab, not a comma. The data was not imported at all.

You should either provide mysqlimport with a tab-delimited text file or use the clause "--fields-terminated-by=','" (minus the doublequotes) with mysqlimport.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top