How do I set a variable to the result of select query without using a stored procedure?
I want to do something like: OOdate DATETIME
SET OOdate =
This will work for original question asked:
DECLARE @Result INT; SELECT @Result = COUNT(*) FROM TableName WHERE Condition