12-15-2017 09:31 AM - edited 12-15-2017 09:34 AM
I tried calling the stored procedure from Teradata to SAS. But I was getting an error as Invalid session mode. Can anyone help me with this error?
Below is the code and error:
proc sql; connect to teradata as tera(user = testuser pass= testpass tpid="XXXXX" connection=global); Create table work.sasresult as Select * from connection to tera(call dbname.spname('2016-01-15','2016-01-30','IND',?,?)); disconnect from tera; quit;
12-17-2017 07:52 PM
To use a Teradata Stored Procedure (or any DBMS Stored Procedure) you need to do it as a CALL EXECUTE, and the results would be a Teradata temporary table (or Global Temporary table, or some kind of scratch table). You would then use Create table work.sasresult as Select * from connection ... to read that table into SAS.