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 8662375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:43:25+00:00 2026-06-12T16:43:25+00:00

How can I get rid of these null columns? I’m importing my csv file

  • 0

How can I get rid of these null columns?
I’m importing my csv file to create a table on phpMyAdmin. The sql query looks appropriate but at the end, I get…

`Category 1` VARCHAR( 97 ) ,
`Category 2` VARCHAR( 113 ) ,
`NULL` VARCHAR( 71 ) ,
`NULL` VARCHAR( 56 ) ,
`NULL` VARCHAR( 73 ) ,
`NULL` VARCHAR( 97 )
) ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

MySQL said: 

#1060 - Duplicate column name 'NULL'

Category 2 should be the last column. I can’t figure out where the null columns are coming from, or how to get rid of them. The original file is given to me in .xls format. I make some changes and save as csv. I used to upload an xls file (never had problems) but I think our cPanel was upgraded so it’s all changed.

So far I’ve tried deleting 4+ columns at the end while in OpenOffice. I’ve tried opening the csv in notepad and making sure there was no extra commas or spaces, adding in / to escape. I’ve tried fiddling with the import options in phpMyAdmin but I’m far from an expert so no luck there.

  • 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-12T16:43:27+00:00Added an answer on June 12, 2026 at 4:43 pm

    I had a similar thing with two cvs uploads.
    PHPMyAdmin complained that one had 2 NULL columns at the end, and the other had 6.
    Thought I’d ‘fixed’ it by adding extra fake columns, but no.

    Turned out that some of the data had double quotes round it, fooling mysql into thinking there was the wrong number of columns.

    Just had to check through all the data to make sure it was clean…
    I know its more of a work around than a fix. But the best I could do in a short time.

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

Sidebar

Related Questions

What is this options menu button and how I can get rid of it?
Can optimizers get rid of bad uses of spatial locality? I'm maintaining some code
How can I get rid of HTML tags in a Smarty block? I've tried
I can't get rid of compiler warning when I define property inside protocol. Strange
How can i get rid of trailing spaces in preg_split result without using preg_replace
I have a pretty nasty error I can't get rid of. Here's the function
Can someone figure out how to get rid of the NOT EXISTS statements in
Can get all triples with value null in specific field? All people with date_of_birth
I can get the file path with: (message (file-name-directory (or buffer-file-name load-file-name))) But if
I have the following table: CREATE TABLE `events` ( `evt_id` int(11) NOT NULL AUTO_INCREMENT,

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.