Hi guys,
I have a huge excel with thousands of rows and I need to generate an sql query to insert the data into a sql server database.
The format of the excel is the following
1 | string1 | another string
string2
string3
2 | AAA AAA | ZZZZZZZ
BB BBBB
CCCC CC
The first column is a row counter, it doesn't matter. The second column is a group of strings separated by break-lines The third column is a string that has to be associated to each of the strings on column 2.
So I need to generate the following queries:
INSERT INTO SomeTable VALUES ('string1', 'another string')
INSERT INTO SomeTable VALUES ('string2', 'another string')
INSERT INTO SomeTable VALUES ('string3', 'another string')
INSERT INTO SomeTable VALUES ('AAA AAA', 'ZZZZZZZ')
INSERT INTO SomeTable VALUES ('BB BBBB', 'ZZZZZZZ')
INSERT INTO SomeTable VALUES ('CCCC CC', 'ZZZZZZZ')
Is it clear what I need to do?
Unfortunately my excel habilities are so poor so I can't figure a way to do this.
Any help?
Thank you so much!