Hello Expert,
Just created a code to find some information but I am getting syntax error. Not sure what I am missing in my code. Can you please check and let me know what's the error in my code?
proc sql;
create table Non_UK_address as
select a.*,
b.dr_postcode
from trace_nonlit as a
inner join p2scflow.debtor as b on on A.debt_code = B.debt_code
Where
(b.dr_postcode like '%IM%' or b.dr_postcode like '%JE%' or b.dr_postcode like '%GY%');
quit;
Error:
29 proc sql;
30 create table Non_UK_address as
31 select a.*,
32 b.dr_postcode
33 from trace_nonlit as a
34 inner join p2scflow.debtor as b on on A.debt_code = B.debt_code
_
22
76
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN,
CONTAINS, EQ, EQT, GE, GET, GROUP, GT, GTT, HAVING, JOIN, LE, LET, LIKE, LT, LTT, NE, NET, OR, ORDER, WHERE, ^=, |,
||, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
35 Where
36 (b.dr_postcode like '%IM%' or b.dr_postcode like '%JE%' or b.dr_postcode like '%GY%');
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
37 quit;