Using SQLCMD Mode within SSMS and a SQL script file path, how can I store the result in a temp table?

38 views Asked by At

Using SQLCMD Mode in SSMS (not the SQLCMD Utility) and a file path to a SQL query script, I would like to store the results into a temp table.

I am aware the following command executes the query from a file path, but not sure how to store the results into a temp table.

:setvar path "C:\filepath"
:r $(path)
0

There are 0 answers