Hi, All! I am using the macro facility to generate pass-through SQL code and then call execute to execute the SQL. When running in SAS, the output table is not created but when I run the generated SQL in SQL Server Management Studio, the table is created. I've looked and looked and I can't figure out what the problem is. Anyone know? Thanks! Generated SQL: proc sql; connect to odbc (dsn="QN1_WHSE_MyDatabase"); select * from connection to odbc ( select some_column ,314 as a_constant ,another_column as column_alias ,'C' as another_constant ,column_to_test ,case when column_to_test is not null and column_to_test <> '' then 1 else 0 end as dq_column_to_test ,1 as column_to_test_ct <<<<More tests like above>>>> into [WorkDb].[dbo].MyOutputTable from [WorkDB].[dbo].MyDriverTable drvr join TableToTest t1 on drvr.key_field = t1.key_field ) ; quit;
... View more