Using parameters with relational data source query subjects
Model objects do not reflect changes to the
data source objects on which they are based. Therefore, when you add
a parameter to a data source query subject, consider whether you want
to create a model object that references the parameter. If so, you
must assign an alias to the parameterized object in the data source
query subject. This ensures that model query subjects, filters, or
calculations that reference the object return the correct results
when the parameter value changes.
For example, the following SQL defines a data source query subject that contains a session parameter named runLocale. The runLocale parameter value specifies which column the query retrieves. The alias behaves like a shortcut so that when a model object references CountryNameAlias, IBM® Cognos® Framework Manager retrieves the value to which the alias is assigned.
Select
#$ColumnMap{$runLocale}# as
CountryNameAlias
From
[GoSales].Country