0

I have an external data source created in DB1 and its pointing to DB2 database in Azure.

I want to query a UDF defined in DB2 from DB1.

Following syntax works, from DB1:

EXEC sp_execute_remote
N'Ext_DB2',
N'SELECT Result'

But I want to use following syntax:

select C1, C2, < function_in_DB2 > from t1

I tried searching web, this format is not mentioned anywhere, is it not supported? Any pointers will help.

Thanks !

User2019
  • 61
  • 1
  • 6
  • Hi, welcome to Stack Overflow, If my answer is helpful for you, please mark it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you. – Leon Yue Jun 08 '20 at 02:17

1 Answers1

0

Just per my experience, I think Azure SQL database doesn't support it. As we know, we can't do cross database query directly.

Since none document talk about this, I would suggest you ask Azure SQL support to get more support, ref: How to create an Azure support request.

Hope this helps.

Leon Yue
  • 15,693
  • 1
  • 11
  • 23