Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:46:12+00:00 2026-06-18T09:46:12+00:00

I am facing a strange problem after successfully importing the contents of a .csv

  • 0

I am facing a strange problem after successfully importing the contents of a .csv file in mysql db. The data from the csv file is imported into the db table successfully but no query results are returned if i run any SQL query with a Condition on on the table. I am able to run the query :

select * from mst_question

but no results are returned if a condition is specified and the condition is met

select * from mst_question where qtype='single'

The table is having rows where the column qtype contains the condition text “single” but no results are returned.

Strangely, if i edit the column “qtype” contents in the table and replace the test “single” by typing “single” the row is returned… for every row i edit !!!

My .csv file :

que_id,test_id,que_desc,ans1,ans2,ans3,ans4,true_ans,qtype
,11,In which year is the HTML specification supposed to be complete and finalized?,2012,2015,2020,2022,D,single
,11,Which of the following doctypes was introduced by HTML5?,<!doctype xhtml>,<!doctype html>,"<!doctype html PUBLIC ""-//W3C//DTD HTML 5.0 Transitional//EN"">","<!doctype html5 PUBLIC ""-//W3C//DTD HTML 5.0 Transitional//EN"">",B,single
,11,How do you stop crawlers from following links to sites you don't want to be associated with?,"<a href=""#"" rel=""nofollow""> ","<a href=""#"" rel=""dontgo""> ","<a href=""#"" rel=""nogo""> ","<a href=""#"" rel=""noassociation"">",A,single
,11,Which tag is used to define a section of the page that has content that is related but not critical to the main content in HTML5?,<article> ,<sidesection> ,<aside> ,<section> ,C,single
,11,The <article> is used to contain a main article. What is the tag used to break it into sections?,<article> ,<time> ,<aside> ,<section> ,D,single

My LOAD DATA LOCAL INFILE syntax :

LOAD DATA LOCAL INFILE 'quest.csv' INTO TABLE mst_question FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY """" IGNORE 1 LINES

Output after the LOAD DATA LOCAL INFILE is executed :

(5 row(s)affected)
(0 ms taken)

My SQL Query ( which gives results ) :

select * from mst_question

Result :

(5 row(s)returned)
(0 ms taken)

My SQL Query with simple condition ( which gives NO results ) :

select * from mst_question where qtype='single'

Result :

(0 row(s)returned)
(0 ms taken)

What am i doing wrong ????

Cant find it…. Pls advise…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:46:14+00:00Added an answer on June 18, 2026 at 9:46 am

    My guess is that your file has Windows line feeds:

    ...0,2022,D,single\r\n
    

    You haven’t specified the LINES TERMINATED BY '\r\n' clause so MySQL probably defaults to Unix style (\n) so it actually imports single\r into your column.

    You can inspect exact column contents with HEX().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing very strange problem. After debugging from my side, I thought to
I'm facing a strange problem with NSUsrDefaults. Whenever I'm fetching the data from NSUserDefaults,
I'm facing a rather strange Issue when trying to load data from an XML-Webservice.
I'm facing this strange problem. I'm trying to read a file that is located
I am facing a strange problem with solr. After running solr for few hours,
I am facing a rather strange problem with make. My make file contains: all:
Im facing a strange problem.In emacs whenever i press Shift+C,in a ruby file, it
since today im facing a strange problem. When i start my app in my
I am facing a strange problem and have no idea how to fix this
I am facing a strange problem on my Ubuntu Karmic system. When I call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.