Home Forums SQL Server 2008 T-SQL (SS2K8) Returning stored procedure results into a CTE or temp table? RE: Returning stored procedure results into a CTE or temp table?

  • Thanks 🙂 , but I'm trying to run some dynamic sql which I have built into a memory variable, rather than calling a stored procedure. Something like:

    select *

    into #tab

    from exec (@MyDynamicCode)

    which I know is wrong. I may not have rights to use openrowset, and anyway, using OLE DB for dealing with SQL server tables within SQL Server seems somehow inappropriate.