Database Code

  Home arrow Database Code arrow CSV to SQL convertor
DATABASE CODE

CSV to SQL convertor
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 42
    2005-11-20

    Table of Contents:

     
     

    SEARCH CODEWALKERS

    This tool helps you convert CSV data into SQL Insert queries. Especially useful if you're website is hosted by a third party and plain CSV import is not allowed.

    By : wvervuurt

    1. Create a CSV file in for example Excel.
    2. Copy and paste the data in the big input box,
    and give the name of the table that you want to insert the data into.

    The SQL-query will then be automatically
    generated, using the FIRST row in your CSV data as
    column headers (thus, the column names in your
    SQL-database).

    EXAMPLE:
    Using 'scores' as the insertion table and using
    the following CSV data:

    Name;Score
    John;76
    Mary;132
    Bill;33

    The SQL output will be:

    INSERT INTO scores (`Name`, `Score`) VALUES ('John', '76');
    INSERT INTO scores (`Name`, `Score`) VALUES ('Mary', '132');
    INSERT INTO scores (`Name`, `Score`) VALUES ('Bill', '33');

    Click to Download File



    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Database Code Articles
    More By Codewalkers

    blog comments powered by Disqus

    DATABASE CODE ARTICLES

    - Converting CSV Files to MySQL Insert Queries...
    - Examples and Tools for Database Design
    - Relationships, Entities and Database Design
    - Modeling and Designing Databases
    - Data extract to Excel
    - Oracle database class 0.76
    - The opposite of mysql_fetch_assoc
    - On line Thermal Transmitance Calculation
    - pjjTextBase
    - PHP Object Generator
    - FastMySQL
    - RC4PHP
    - SQL function with integrated sprintf()
    - DB Interaction Classes v1.1
    - deeMySQLParser

    Developer Shed Affiliates

     



    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap