Hi Experts,
I have created a table with phone numbers. Now I am trying to divide the phone numbers into mobile and landline numbers. Suppose if the mobile number starts with 07 then I am using the below code but getting some error in the code. Can you please suggest?
proc sql;
create table Mobile_numbers as
select a.*,
case when dr_phone like (07%) then 'Mobile' else 'Landline'
end as Mobile_or_Landline
from Telephone_numbers;
quit;
Error:
29 proc sql;
30 create table Mobile_numbers as
31 select a.*,
32 case when dr_phone like (07%) then 'Mobile' else 'Landline'
_
22
200
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, ), *, **, +, -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN,
CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.
ERROR 200-322: The symbol is not recognized and will be ignored.
33 end as Mobile_or_Landline
34 from Telephone_numbers;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
35 quit;
... View more