Excel - Concatenate function to create SQL

1 - About

How to create a function in order to create a SQL statement in Excel with the CONCATENATE function.

3 - Steps

  • Add a simple quote before all single quote in the data columns

  • Then write a formula column as below

In English


=CONCATENATE("INSERT INTO TABLE (COLUMN1, COLUMN2) VALUES ('"; $A2; "', '";$B2; "');" )

In Dutch


=TEKST.SAMENVOEGEN(("INSERT INTO TABLE (COLUMN1, COLUMN2) VALUES ('"; $A2; "', '";$B2; "');" )

The separator character can change in function of the Excel locale

Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap