You can use the Resident predicate in a LOAD statement to load data from a previously loaded table. This is useful when you want to perform calculations on data loaded with a SELECT statement where you do not have the option to use QlikView functions, such as date or numeric value handling.
In this example, the date interpretation is performed in the Resident load as it can't be done in the initial Crosstable LOAD.
Resident or preceding LOAD?
In most cases, the same result can be achieved by using a preceding LOAD instead, that is, a LOAD statement that loads from the LOAD or SELECT statement below, without specifying a source qualifier such as From or Resident that you would normally do. A preceding LOAD is generally the faster option, but there are some cases where you need to use a ResidentLOAD instead:
- If you want to use the Order_by clause to sort the records before processing the LOAD statement.
- If you want to use any of the following prefixes, in which cases preceding LOAD is not supported: