Hello, I am trying to capture all the names that follow a pattern using the LIKE operator in proc sql. I don't want to use a OR command or a UNION in my sql. Is there a better way of doing it like using a IN associated with LIKE. data test ; input id name $ ; datalines ; 12 ANOOP 13 ANEESH 14 REMYA 15 REMY 16 JACK 17 JACOB 19 AMY 20 ROSE ; run ; proc sql; select * from test where name like in('%AN%','%RE%') ; when i execute this I get the below error ERROR: LIKE operator requires character operands. so I removed IN and ran it and I got the below errors 43 where name like ('%AN%','%RE%') ; _ 22 76 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 76-322: Syntax error, statement will be ignored. Thanks,
... View more