0

I'm trying to run the following code

PROC SQL; 
    CREATE TABLE _check AS 
    SELECT DISTINCT * FROM table1 as a 
        INNER JOIN  table2 as b
          ON ON UPCASE(b.Cname) contains UPCASE(SUBSTRING(CNAMN, 1, 4))
    ;
quit; 

but I get the error

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, FROM, 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.

any clues? What is the correct syntax to handle substrings in a contains?

Thanks in advance

Joe
  • 62,789
  • 6
  • 49
  • 67

0 Answers0