Hi, I am trying to do something like this:
while @nrOfAuthlevels >= @myAuthLevel
begin
set @myAuthLevel = @myAuthLevel + 1
SELECT Role.name, Role.authorityLevel
FROM [dbo].[Role]
ORDER BY Role.authorityLevel
end
The result of this stored procedure shall be a table with all Role.authorityLevel below my own. But this generates several tables.
Thanks in advance
Br Christoffer