Trying to update perform one hot encoding to replace values of 1 and 0 based on cell values.
PROC SQL;
/* Update the ‘la_education_graduatea’ column */
UPDATE DMLIB601.LOAN_APPROVAL_SORTED_DS
SET la_education_graduatea =
CASE
WHEN UPCASE(TRIM(la_education)) eq ‘GRADUATE’ THEN 1
ELSE 0
END
WHERE la_education IS NOT MISSING AND TRIM(la_education) NE ”;
/* Update the ‘la_education_notgraduatea’ column */
UPDATE DMLIB601.LOAN_APPROVAL_SORTED_DS
SET la_education_notgraduatea =
CASE
WHEN UPCASE(TRIM(la_education)) eq ‘NOT GRADUATE’ THEN 1
ELSE 0
END
WHERE la_education IS NOT MISSING AND TRIM(la_education) NE ”;
QUIT;
Complied without errors but the results is showing all 0 , seems like the update didn’t happen.
Terri . K Woon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.