Help using Base SAS procedures

error linking local tables to server tables

Reply
Super Contributor
Posts: 401

error linking local tables to server tables

Hi, I'm trying to link a local table to a server table (2 separate times) using the code below and ran into an error.  Any ideas? rsubmit; proc sql inobs=100; connect to teradata(&password); create table SMEOD.OD_IP_INFO_STEP_2(compress=Y) as select C.AR_ID, C.CLNT_NO, C.CLNT_AR_RELTN_TYP   from SMEOD.OD_ACCT_INFO_STEP_1 D join   (SELECT * from connection to teradata     (select * from DDWV01.CLNT_AR_RELTN ))C ON C.SNAP_DT = D.SNAP_DT   AND C.AR_ID = D.AR_ID   AND C.DW_SRVC_ID = 2 /* Change SRVC_ID = 2 to capture Business Accts */   AND C.CLNT_NO = (SELECT * from connection to teradata (SELECT MAX(CLNT_NO) FROM DDWV01.CLNT_AR_RELTN))  B                       WHERE  B.SNAP_DT = D.SNAP_DT                       AND B.AR_ID = D.AR_ID                       AND B.DW_SRVC_ID = 2 /* Change SRVC_ID = 2 to capture Business Accts */                       AND B.PRMRY_CLNT_IND = 'P' ; quit; endrsubmit; THE ERROR CODE IS : (SELECT MAX(CLNT_NO) FROM DDWV01.CLNT_AR_RELTN))  B                                                                                                           -                                                                                                           22 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, ',', -, /, , =, >, >=, AND, EQ, EQT, GE, GET, GT, GTT, LE, LET, LT, LTT, NE, NET, OR, ^=, |,               ||, ~=. Thank you.

Ask a Question
Discussion stats
  • 0 replies
  • 145 views
  • 0 likes
  • 1 in conversation