4/06/2015

How to generate SQL scripts using excel?

  Mohan       4/06/2015
We can generate SQL statements using CONCATENATE function in Excel and execute those. This is much faster than using Import/Export Wizard.
Data in spread sheet is looks like below
generate_sql_excel.jpg

Copy and paste the below formula in the fourth column to generate the formula ="INSERT INTO table_name VALUES('"&A1&"','"&B1&"','"&C1&"')"

formula.jpg


To Apply this formula to all the columns Go to the corner of the column and drag it to column till formula needs to be applied.
logoblog

Thanks for reading How to generate SQL scripts using excel?

Previous
« Prev Post

1 comment:

  1. Excel is a software program from Microsoft basic excel for beginners that is a part of Microsoft Office. Excel calculations is compiled for making and altering spreadsheets that are spared with a .xls expansion. It's general uses in corporate cell-based figuring, turn tables, and different diagramming devices. With an Excel spreadsheet, you could make a month to month spending plan, track costs of doing business, or sort and compose a lot of information calculations in spreadsheets of Excels.

    ReplyDelete