DATA Step, Macro, Functions and more

Creating temp table in sql server pass through?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

Creating temp table in sql server pass through?

Hi, Does anyone know how to create #temptables in SQL Server using SQL Pass through?

 

The following code runs successfully but there is no #temporaryTable in SQL Server.

 

Proc sql;
connect to sqlserver(...);

execute(select prod_id
into #temporaryTable
from PRODUCTS)
by sqlserver;
quit;

 

Thanks

 

Andrew

 


Accepted Solutions
Solution
a week ago
Occasional Contributor
Posts: 14

Re: Creating temp table in sql server pass through?

Posted in reply to andrewjmdata

I think I have solved this by talking to a colleague. 

 

The #temporaryTable only exists for the duration of the connection!

 

Hope this helps some one else.

 

Andrew

View solution in original post


All Replies
Solution
a week ago
Occasional Contributor
Posts: 14

Re: Creating temp table in sql server pass through?

Posted in reply to andrewjmdata

I think I have solved this by talking to a colleague. 

 

The #temporaryTable only exists for the duration of the connection!

 

Hope this helps some one else.

 

Andrew

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 51 views
  • 0 likes
  • 1 in conversation