Hello All,
I couldn't solve that mistery question in SQL SERVER.
Here an example that I tried to do and it didn't work.
DECLARE @Total int;
SET @Total = (SELECT COUNT(*)-10 FROM MYTABLE)
SELECT TOP @Total IdColumn FROM MYTABLE
How can I use the following query
SELECT COUNT(*)-10 FROM MYTABLE
as an integer variable, somewhere else in my code.