First time here? Check out the Help page!
1 | initial version |
The sqlFile.execAndReturn...
methods query values from whatever Sql table you ask it to. It is not hard-coded to query the TabularDataWithStrings table.
For example, here is a query from one of my own reporting measures that queries the ReportMeterData table:
query = "SELECT SUM(VariableValue) FROM ReportMeterData WHERE ReportMeterDataDictionaryIndex IN (SELECT ReportMeterDataDictionaryIndex FROM ReportMeterDataDictionary WHERE VariableName='Electricity:Facility' AND ReportingFrequency='Run Period' AND VariableUnits='J')"
value = sqlFile.execAndReturnFirstDouble(query).get
puts value