Thanks for the quick replies! When I add the reference to the sql table using libname, I get an error. I've confirmed the libname process works as I can do other tasks successfully. What I ultimately need to achieve is adding the id,name,city to v.tableX (from work.tableY). Wondering if part of the issue is that id is a primary key? Either way, I need to insert the id from work.tableY as it's from a prod db and affects mappings to other tables. So I don't want to the use the libname option of ignore_read_only_columns=yes, as the id's aren't sequential. That's why I'm trying to use IDENTITY_INSERT, plus the insert code, in the single proc sql. libname v odbc dsn=DB user=sa pwd=admin schema=dbo; proc sql; connect to ODBC as mycon (datasrc='DB'); EXECUTE (SET IDENTITY_INSERT v.tableX ON ) by mycon; INSERT INTO v.tableX (id,name,city) SELECT (id,name,city) FROM work.tableY; EXECUTE (SET IDENTITY_INSERT v.tableX OFF ) by mycon; disconnect from mycon; quit; ERROR: CLI execute error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot find the object "v.tableX" because it does not exist or you do not have permissions.
... View more