Jump to content

Importing of CSV files into database


genzedu777

Recommended Posts

Hi all,

 

I am currently facing an issue in importing CSV files into my database, due to the 'comma' issue

 

As you can see in picture1.jpg, I have the fields terminated by 'comma'.

 

The error happens in Picture2.jpg, as you can see through the red pointed arrow, No.5 'tutor_id' column became something else. It was due to No.2's tutor comment.

 

No.2 tutor's comment was written in such

"- 2 YEARS OF TEACHING EXP

- 2

- PRI MATHS AND SCIENCE

- BOTH ARE JUST GETTING PASSES IN THE SUBJECTS. AFTER 6 MONTHS, ONE GOT 75% AND THE OTHER 80%"

 

Basically "ONE GOT 75% AND THE OTHER 80%" appears in No.5 tutor's tutor_id, and the one which is highlighted in blue and nowhere to be seen in No.2 tutor's comment, it has been chopped off (see picture3.jpg)

 

Any idea how I should overcome this error? Should I set my 'fields terminated' as something else instead of the comma?

 

Please help!!

 

Thanks

 

[attachment deleted by admin]

Link to comment
Share on other sites

Hi,

 

Surprisingly, after trying it back home, it didn't work well again.

 

After placing an inverted comma in 'Fields enclosed by', and imported into the database, record 1, 2 and 10 appeared, but 3 - 9 were missing.

 

Picture2.jpg shows the appeared records and example1.doc shows the file which I am importing

 

May I know what is the possible reason that I have missing records?

 

[attachment deleted by admin]

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.