I want to select some rows from a column ( I have a column named as 'RESOLUTION' in the current data table)
This two lines will work:
dt = Current Data Table();
dt<<Select Where(RESOLUTION > 0.);
If I define 'RESOLUTION' as another variable, it doesn't work:
dt<<Select Where(column(dt, colA) > 0.);
This will not select any row.
Could someone kindly tell me how could I do this?
This will do the trick.
colA = "Resolution";
col_expr = "dt << Select Where(:name(\!"" || colA || "\!") > 0.)";
Basically you're creating some dynamic code, and then executing it.
Alternatively use the AsColumn function:
dt<<Select Where(AsColumn(colA) > 0.)
There are no labels assigned to this post.