I am using a PROC SQL in SAS EG connected to a Hive. I am trying to take this Substring(CLM.etl_file_name,(length(substring_index(CLM.etl_file_name,'_',1))-7),8) and turn it in to a date. The original data element is a long string of characters to create a file name. I've tried to use CAST CAST(Substring(CLM.etl_file_name,(length(substring_index(CLM.etl_file_name,'_',1))-7),8)as DATE) as myETLdate but it returns every value as a decimal point or period...call it a dot If I use Convert Convert(Substring(CLM.etl_file_name,(length(substring_index(CLM.etl_file_name,'_',1))-7),8), DATE) I get this message back CLI prepare error: [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:126 cannot recognize input near 'DATE' 2 The SAS System 07:51 Friday, December 27, 2019 ')' 'as' in expression specification Any idea what will work? I think it might have something to do with the connection to Hive. I've come across one other situation where Hive wanted me to use a different language than what I would normally use with SQL.
... View more