Saturday, August 2, 2014

how to save the result set of a SELECT in a variable ?

Try this



declare @aVal int, @bVal int;
select @aVal = min(d.DateValue), @bVal = max(d.DateValue)
from dbo.dimDate d
where d.BusinessYear = 2014





[Personal Site] [Blog] [Facebook]signature


No comments:

Post a Comment