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

  • Home
  • SEARCH
  • 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 3444322
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:54:03+00:00 2026-05-18T08:54:03+00:00

We have a CSV file, which we have meticulously checked and stripped to show

  • 0

We have a CSV file, which we have meticulously checked and stripped to show the data in the format we want.

As such this csv file is, just under 500kb in size. I have converted to sql ( saved as txt ) hope thats ok.

The original csv data entry is 3 fields, as thus:

‘STANLEY’,’7331′,’TAS’

‘GORMANSTON’,’7466′,’TAS’

After conversion its like so:

INSERT INTO suburbs ('Locality','Pcode','State') VALUES (‘\’STANLEY\”,’\’7331\”,’\’TAS\”);

INSERT INTO suburbs ('Locality','Pcode','State') VALUES (‘\’GORMANSTON\”,’\’7466\”,’\’TAS\”);

Ok now, not being a db officianado, I would like to know. Have I converted it correctly ?
Should I be looking at making this code cleaner for import to the db.

The sql is over 1.6 mb for this file, with over 16,000 entries, so want to make sure I have done things correctly.

Cheers

  • 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-05-18T08:54:04+00:00Added an answer on May 18, 2026 at 8:54 am

    As with what Adam’s comment said, you’re most likely not going to want to insert the quotes, which you are doing with \’STANLEY\’ etc.

    Also, on the ‘field’ side (locality etc), make sure those are back ticks (non-shift tilde), and the data side (STANLEY) are single quotes.

    change to:

    INSERT INTO suburbs (`Locality`,`Pcode`,'State`) VALUES ('STANLEY','7331','TAS');
    

    Other than that, I don’t see anything wrong with it.

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

Sidebar

Related Questions

I have a CSV file which has the following format: id,case1,case2,case3 Here is a
I have a CSV file which I am processing and putting the processed data
I have a csv file which looks like this $lines[0] = text, with commas,
can anyone please help me with this query. I have a CSV file which
I have a CSV file containing some user data it looks like this: 10333,,an.10,Kenyata,,Aaron,,,,,,,,,,
I have a NSString *csvData which contains the csv data and the format is
I have a csv file which has a word for each row like this
I have a CSV file of data which I'm attempting to use in my
I have a large data coming from a csv file which looks something like
I have a csv file of the format: 270291014011 ED HARDY - TRUE TO

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.