Forcing a SQL Remote Query to filter remotely instead of locally

前端 未结 3 1923
野的像风
野的像风 2021-01-20 02:16

I have a MS SQL Query that is pulling data via from a remote server. The data that I\'m pulling down needs to be filtered by a date that is determined at run time.. When

3条回答
  •  滥情空心
    2021-01-20 02:32

    Can't you just send a query like this, or does the clr function have to actually be called inside the select statement?

    Declare @datetime datetime
    Set @datetime = dbo.MyCustomCLRDateFunction()
    
    SELECT * FROM SERVER.Database.dbo.RemoteView
    WHERE EntryDate > @datetime
    

提交回复
热议问题