can you show the LOG you get when running that code? Copy the entire proc step with messages and paste into a code box opened on the forum with the </> icon.
CODE - proc sql; create table method as select distinct (methodofpayment) as consumernumber , case when ((METHODOFPAYMENT) not like "4%") then 'not selected' when ((METHODOFPAYMENT) not like "H%") then 'not selected' when ((METHODOFPAYMENT) not like "M%") then 'not selected' when ((METHODOFPAYMENT) not like "N%") then 'not selected' when ((METHODOFPAYMENT) not like "Q%") then 'not selected' else 'selection' end as selectionresult from TEMP;
THIS IS THE OUTPUT I AM GETTING:
consumernumber selectionresult HD not selected SX not selected 91 not selected S5 not selected W not selected 5 not selected H not selected SQ not selected ST not selected HX not selected H2 not selected
case when first(ConsumerNumber) IN ("4", "H", "M", "N", "Q", "R") then 'Selected' Else 'Not Selected ' end as selectionresult
PG
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!