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
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.