I have a query I build into a NVARCHAR due to an issue between SQL Server and a linked Oracle server forcing me to use OpenQuery. It works fine and I get the results I need when I run exec (@OPENQUERYFULL)
.
My results are a single column of numbers I need for another query. I would like to be able to use those results as an "IN ()" statement or as a JOIN but what I have tried so far has failed.
Is there a way to use the results of an exec
query directly in another query?
UPDATE: To be clear I was trying to avoid using a temp table.