Skip to content
Advertisement

Using a table as input parameter for sp_execute_remote (Azure SQL Database)

I am trying to use a table as input parameter for sp_execute_remote (Azure SQL Database).

I declared the type on the remote db:

I try to execute the script on my local db:

I get an error on the 3rd EXEC statement: The underlying error message received was: ‘Operand type clash: int is incompatible with MyType’.

Thanks.

Benoit

SOLVED by using JSON:

Advertisement

Answer

Even in “regular” SQL Server table types are not interoperable between databases. In technical terms table types belong to a particular database lack “duck typing” Eg this

fails with

So, use JSON.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement