Hi All, |
It' been a while since I have posted an SQL query with VBA on here Xenou and you have been a massive help to me always |
My question is, how do you write a string where I can am doing multiple statements |
I.e |
So in essence, I am running 1 statement if you like and all of the statements get run one after another |
Now how can I put the above into a an SqlString in Excel VBA and use that?
Code:
|
<tbody>
Code:
[TR]
[TD][COLOR=#00FF00]This part is done 1st[/COLOR][/TD]
[/TR]
[TR]
[TD]
call master.drop_table ('drop table MI166_A')[/TD]
[/TR]
[TR]
[TD];[/TD]
[/TR]
[TR]
[TD][COLOR=#00FF00]This part is done 2nd[/COLOR]
[/TD]
[/TR]
[TR]
[TD]create table MI166_A as[/TD]
[/TR]
[TR]
[TD]([/TD]
[/TR]
[TR]
[TD]select /*+ PARALLEL(a,32) */ [/TD]
[/TR]
[TR]
[TD] *[/TD]
[/TR]
[TR]
[TD]from CIS.TVP068ACTIVITY a[/TD]
[/TR]
[TR]
[TD]where TS_COMPLETED is null[/TD]
[/TR]
[TR]
[TD])[/TD]
[/TR]
[TR]
[TD];[/TD]
[/TR]
[TR]
[TD][COLOR=#00FF00]This Part is done 3rd[/COLOR]
[/TD]
[/TR]
[TR]
[TD]create index IDX_MI166_A1 on MI166_A (NO_ACCOUNT, CD_COMPANY_SYSTEM)[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD];
[COLOR=#00FF00]This Part is done last[/COLOR]
[/TD]
[/TR]
[TR]
[TD]create index IDX_MI166_A2 on MI166_A (NO_EMPL_ASSGN, CD_COMPANY_SYSTEM)[/TD]
[/TR]