I ran the code with the options you suggested, and here is the log: 26 CREATE TABLE TUnionLD AS
27 select *
28 from connection to myconn
29 (
30 SELECT AD.AGENCY_DATA_KEY AS api_call,
31 AD.DATE_ENTERED AS api_datetime
32 FROM CUSTOMERSCORING.DBO.AGENCYDATA AD
33 WHERE AD.AGENCY_MASTER_KEY in (68) AND AD.DATA_ERROR = 0 AND
34 AD.DATE_ENTERED
SYMBOLGEN: Macro variable STARTDATE resolves to "2018-11-26"
34 ! >= &startdate. AND AD.DATE_ENTERED < &enddate.
SYMBOLGEN: Macro variable ENDDATE resolves to "2018-10-12"
35
36 )
37 ;
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '2018-11-26'. : [Microsoft][ODBC SQL
Server Driver][SQL Server]Invalid column name '2018-10-12'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s)
could not be prepared.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
38 disconnect from myconn;
NOTE: Statement not executed due to NOEXEC option.
39 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.08 seconds
cpu time 0.00 seconds
40 proc sql;
2 The SAS System 13:07 Monday, November 26, 2018
41 create table TULD as
42 select datepart(api_datetime) as api_date format yymmdd10.,
43 count(distinct api_call) as Count format comma20.
44 from TUnionLD
45 group by api_date
46 ;
ERROR: Function DATEPART requires a numeric expression as argument 1.
ERROR: Character expression requires a character format.
ERROR: The following columns were not found in the contributing tables: api_call, api_datetime.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
47 quit;
... View more