Reputation: 854
In my Firebird database, I have a Table_Product
which stores many individual numbered tables, for example:
TBID PRODUCT PRICE
1 A 10
1 B 20
1 C 70
...
And I need to make an SQL INSERT to include a new one:
TBNID PRODUCT PRICE
2 D 80
2 F 40
2 G 30
My new table data is in Excel file.
How could be an SQL Statement to accomplish it? How can I convert the excel table so I can plug the data into the SQL statement ?
INSERT INTO Table_Product (TBNID,PRODUCT,PRICE) values ... ?
Upvotes: 0
Views: 6053
Reputation: 68
=" INSERT INTO Table_Product (TBNID, PRODUCT , PRICE) values ('"&H2&"','"&I2&"','"&J2&"') ;"
just change the Cell locations then drag down.
Upvotes: 4