Jump to content

Some letters are missing in the uploaded database??


sashi34u

Recommended Posts

Hi all,

 

My MySQL version is 5.0.51b

 

I am trying to upload a CSV file using the LOAD DATA INFILE command. The data is getting uploaded, but when I see the data, in the First column

1) Some of the rows have their first letter missing

2)Some of the rows have 2 or more than two letters missing

3) only one row has the full name without missing any thing

 

This is the Code I am using:

 

LOAD DATA INFILE 'C:/Users/Sashikanth/desktop/buildings.csv' INTO TABLE sashi4 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '/n' (BN, BC);

 

 

 

Can anyone please tell me as to what the reason could be??

 

Thanks,

Sashi

Link to comment
Share on other sites

These are some of the lines in the original .csv file

 

Burruss Hall 176

Squires Student Center 180

Student Services Building 192

Torgersen Hall 174

University Bookstore 178

Whittemore Hall 134

Williams Hall 152

Smyth Hall 105

 

 

The First part is the building name and the later integer part is the building code.

Link to comment
Share on other sites

Sorry about the confusion. I was actually using '\n'. I just mis typed it in the query box. I am using the Vista operating system, and the file I have used was excel file in the MS_WORD 2007 format. I have saved it as .csv file and used it to upload the data.

 

Forgot to mention one more thing.

When I said that

1) Some of the rows have their first letter missing

2)Some of the rows have 2 or more than two letters missing

3) only one row has the full name without missing any thing

 

I was using a .txt file, with a comma between the first column and second column, the 3rd row from the bottom goes in correctly. This particular row has a building code which is not entirely numeric. It has an alphabet in the building code. I do not know if that is causing some issue.

 

I was trying different combinations in .csv and .txt and got mixed up. Sorry about that.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.