REPLACE NUMERIC CASE command
See Crunch Automation basics for more information.
The REPLACE NUMERIC CASE command allows you to overwrite a non-derived variable's values with numbers based on multiple cases (conditions).
REPLACE NUMERIC CASE alias
WHEN condition THEN (float|VARIABLE alias),
...
WHEN condition THEN (float|VARIABLE alias)
[ELSE (INTO NULL|float|VARIABLE alias)]
END;
Example
REPLACE NUMERIC CASE q2_capped
WHEN q2 > 10 THEN 10.0
ELSE VARIABLE q2
END;