Question
· Jan 12, 2023

Needed Class Parameter specification and use that works SQLComputeCode

In trying to define a Class Parameter that I can use in SQLComputeCode I can't seem to get any of the syntaxes for the using of the parameter where the SQL compute code will actually evaluate the parameter values. There is nothing specific that I can find in the docs about SQLCompute Code and Parameter usage.

Is there some specific syntax for accessing a class defined parameter in the SQL Compute Code that works?

This is on: IRIS for Windows (x86-64) 2022.1.1 (Build 374U) Tue Oct 18 2022 17:37:34 EDT

Discussion (4)3
Log in or sign up to continue

Often SqlComputed is used for properties that are also calculated like:

Property TestCalc As %String [ Calculated, SqlComputeCode = { Set {*} = ..#TestParam }, SqlComputed ];

but in that case ..#ParamName does not work, this works:

Property TestCalc As %String [ Calculated, SqlComputeCode = { Set {*} = ##class(test.CalcParm).#TestParam }, SqlComputed ];

Enrico