Best way to find current value of a variable

I'm working on a data management query report. I've a dataset which stores information about variables where query was placed. Based on that information, I've to find current value of the quaried variable.

Re: Best way to find current value of a variable

Not sure what you mean by CURRENT value, but it looks like you have simple code generation problem.

Figure out what code you would need to get your desired result and then figure out how to generate that code from your input metadata table. Since your queries will need to analyze many input tables you might want to do it either one record of your metadata table at a time. But you could also possible group the metadata by the source data table and try to generate the results for all queries against that table at the same time.