Trying to translate some basic code from m8 to m9 and run into a simple issue with how to write the equivalent in m9. I use this type of format often in m8 - the looping of a query sequence is cool.
I had a look through the help around this. In particular, I got stuck on the syntax "&(i)&" bit. I wasn't sure how to search for this in the help? I tried loop, query and a few other search words
m8 = vbscript
set doc = Application.ActiveDocument
set comps = doc.componentset
i = 1
set q1 = comps.item("q1_phx_variables_input_query")
q1.text = "update (select c.treated_area e, d.sumarea f from [Fop17_20_y1_phx5_alt1_tests_rr 2] c, "_
&"(select scenarioid, sumarea from (select sum(area_ha1) as sumarea from [Rand_weighted_fop17_bu_setup_200_iters] where total"&(i)&" = 2) a, "_
&"(values ("&(i)&") names (scenarioid)) b) d where c.scenarioid = d.scenarioid )set e = f;"
i = i+1
loop until i > 50
m9 vbscript - attempt at getting something to work
Set app = Manifold.Application
Set db = app.GetDatabaseRoot()
i = 2
text = "alter table year"i" (add year_test int64);"
Set query = db.RunCompile(text)
Set table = query.Run()
Any help appreciated.