I need to change a data type for a field (field1) that I am querying from numeric to character. Here is the code that runs and provides the field back as a numeric data type using PROC SQL. I have been able to convert the number to a character using the Data statement along with the put function but can thus be accomplished in the PROC SQL statement? proc sql; connect to oracle as example(user=***** pw=***** path=abcd.xxxxx.com); create table work.data as select * from connection to example ( select field1, field2, from example.Address where Address_Type = 'PRIMARY' ); quit; Here is what I have tried but get the following error message proc sql; connect to oracle as example (user=xxxxx pw=xxxx path=abcd.xxxxx.com.com); create table work.data as select * from connection to example ( select field1 as put(field1, $15.), field2 from example.Agency_Address where Address_Type = 'PRIMARY' ); quit; ERROR: ORACLE prepare error: ORA-00923: FROM keyword not found where expected. SQL statement: select field1 as left(put(field1, $15.)), field2 from Example.Agency_Address where Address_Type = 'PRIMARY'. Thanks in advance for your time.
... View more