Hi. Is it possible to set a number of variables in one shot in something like the following manner:
SELECT TOP 1 field1, field2, field3
FROM MyTable
ORDER BY SortOrder ASC
SET @f1 = field1
SET @f2 = field2
SET @f3 = field3
The point is that I don't want to have to run a separate SELECT query for each row in the table.
SELECT TOP 1 field1, field2, field3
FROM MyTable
ORDER BY SortOrder ASC
SET @f1 = field1
SET @f2 = field2
SET @f3 = field3
The point is that I don't want to have to run a separate SELECT query for each row in the table.