I need to create lot of SQL insert statements, using an excel datasheet.
Suppose I have the following excel:
A B C
----- ---- ----- >>>> ----
TE ZZ Insert into TABLE (CODE, VAL) Values ('&A1', '&B1');
TT CC Insert into TABLE (CODE, VAL) Values ('&A2', '&B3');
EX FF Insert into TABLE (CODE, VAL) Values ('&A3', '&B3');
My output should be:
Insert into TABLE (CODE, VAL) Values ('TE', 'ZZ');
Insert into TABLE (CODE, VAL) Values ('TT', 'CC');
Insert into TABLE (CODE, VAL) Values ('EX', 'FF');
I’m unable to achieve it. I tryied with &A1, =A1.
Should I split my whole string and use concatenate?
Insert into TABLE (CODE, VAL) Values ('
A1
', '
B1
');
Your column C should have formulas like this: