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
You could also construct a string and use an openquery ...
set @sqlString =
 ' select into myTable from openquery
    (remoteServer,
        "SELECT * FROM Database.dbo.RemoteView WHERE EntryDate > %DTSTART"
    )
 '
set @sqlString  = 
    replace(@sqlString, '%DTSTART', 
                        (select cast(dbo.MyCustomCLRDateFunction() as char(8)) 
           )
EXECUTE sp_executesql @stmt=@sqlString