Hi, I am wondering why this code does not working, hope u all figure out the reason create table data_tt1_pct_case as select *, case (select ifa_pct from data_tt1_pct_case) when between (10) and (30) then 'Qutlier quarter' when ge (31) and le (50) then 'Average quarter' when ge (51) and le (80) then 'Good quarter' when ge (81) and le (100) then 'Poor quarter' else 'not in range' end as Case_pct from data_tt1_pct; quit; ERROR: Function BETWEEN could not be located. ERROR: Function GE could not be located. ERROR: Function LE could not be located. ERROR: Function GE could not be located. ERROR: Function LE could not be located. ERROR: Function GE could not be located. ERROR: Function LE could not be located. if I change the command as follow: create table data_tt1_pct as select QuarterCode, Total label='Total Premiums', ifa as ifa_premium label="IFA Premium", abs(ifa/Total) as ifa_pct format= percent8.1 label='Percentages for IFA' from data_tt1_diff; create table data_tt1_pct_case as select *, case when ifa_pct between 10 and 30 then 'Qutlier quarter' when ifa_pct between 31 and 50 then 'Average quarter' when ifa_pct between 51 and 80 then 'Good quarter' when ifa_pct between 81 and 100 then 'Poor quarter' else 'not in range' end as Case_pct from data_tt1_pct; quit; the word between is black, thus I am not sure it is recognised as keyword or not, and there is no error, but the output of Case_PCT is all stated "not in range".
... View more