I'm pulling in a table from a SQL server over which I have no control. One of the field names is greater than 32 characters, so when I try and do anything with it, including changing the name, I get an error telling me "the variable is longer than 32 characters". Is there any way to do convert the variable name without getting this error? I've tried using the rename function in the proc sql command I'm using to connect to the server.
The table reads in fine otherwise and even keeps the variable name as 35 characters long in its full title, but when I try and use it is where I get the problem.
Here's my code:
proc sql exec;
connect to odbc (dsn='xxxxx' user='xxxxx' pwd=xxxxxxxxxx);
create table XYZ
(rename = longvariablenamexxxxxxxxxxxxxxxx = shortvariablename)) as
select * from connection to odbc
(select * from tablename);
quit;
The error pops up even here when I try and use the rename function in that line of code.