In columnA of excel sheet 'Input' I have the following (with each line being on a new row in the sheet):
update my_table
set time = sysdate,
randfield1 = 'FAKE',
randfield5 = 'ME',
the_field8 = 'test'
where my_key = '84'
;
update my_table
set time4 = sysdate,
randfield7 = 'FAeKE',
randfield3 = 'MyE',
the_field9 = 'test'
where my_key = '37';
I'm trying to create a new sheet 'output' that only contains the following values in columnA but I don't know how to extract the bit in between the quotes after --> where my_key:
84
37
Some notes: it would be great to be able to specify the fieldname in cell B1 of sheet 'input', in this example it would be my_key.
Previously, I've been doing this manually using filter column where text contains 'where' then stripping out everything after the equals then doing a find/replace on single quotes and ;s. Has anyone been able to achieve this with a single button click macro?