Thursday, 14 September 2017

Converting excel data into SQL insert query.

Lets suppose you have thousands of data which you need to insert in database and that data is in Excel.

you can easily convert your data into query.

1. insert a new column in your sheet.

2. write this query in the first empty column which is newly created 

here B2,C2 represent columns of your data.



Query builder:

 ="insert into employees values('"&B2&"','"&C2&"','"&D2&"','"&E2&"','"&F2&"',

'"&G2&"','"&H2&"','"&I2&"','"&J2&"','"&K2&"','"&L2&"','"&M2&"');"


3. Add coloumns which you need in your query.
4. drag down to all rows so that changes reflect for all the rows.
5. save your excel.

you have sql query of insertion.

No comments:

Post a Comment

Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...