azureazure-sql-server

Azure Synapse - Select Insert


This is my 1st time working with Azure synapse and It seems Select Insert is not working, is there any workaround for this one, where I will just use select statement and then dump it into a temporary table?

here are the error prompted

The query references an object that is not supported in distributed processing mode.

and this is my query

Select * Into #Temp1 FROM [dbo].[TblSample]

This is the azure synapse we are currently using

ondemand-sql.azuresynapse.net


Solution

  • In Synapse On-Demand, the use of Temporary Tables is limited. In your case I am assuming that dbo.TblSample is an External Table which is possibly why you are facing this restriction.

    Instead of using a Temp Table, can you either just JOIN the TblSample directly or use a CTE if you are SELECTing specific rows and columns?