jeudi 2 mai 2019

SAS Case Statement - if this, then that . else leave as is

I have a column with some unwanted data "XX" and want to set them as 0. Otherwise, keep the column's data as it is. Something similar to if columnA = "XX" then 0 Else columnA. I tried doing this using a proc SQL SAS step, but that did not work. So looking for the most efficient way of doing using SAS SQL. Thanks for any help.

if columnA = "XX" then 0 
Else columnA
End as columnA

Aucun commentaire:

Enregistrer un commentaire