Hi,
what i would like to do is:
set @maxfound = (select max(date) from table1)
then work with @maxfound
but since i am crossing linkservers:
SET @query_max = "select max(date) from " + @link_server +".database1.dbo.table1"
EXEC (@query_max)
how can i assign the result to a variable like @maxfound.
Thanks
what i would like to do is:
set @maxfound = (select max(date) from table1)
then work with @maxfound
but since i am crossing linkservers:
SET @query_max = "select max(date) from " + @link_server +".database1.dbo.table1"
EXEC (@query_max)
how can i assign the result to a variable like @maxfound.
Thanks