March 2018
Beginner to intermediate
514 pages
13h 11m
English
Dollar-sign expansion is used to read or use the value of a variable in the script. In the previous section, we showed you how you could see what a variable contains; however, variables would not be useful if we could only read their values but not make use of them.
The dollar-sign expansion starts with $( and ends with ) at the end of the variable name, for example:
$(vSumResult)
To illustrate this better, let's have a look at the following example:
SET vMyInterestRate = 0.02;Balance:LOAD AccountId,Balance,Balance * $(vMyInterestRate) AS [Interest On Balance],Balance * (1+$(vMyInterestRate)) AS [Final Balance]FROM[lib://MyFiles/CustomerBalances.qvd]
Read now
Unlock full access