3
I need to present a result of a subquery and use the same result to perform a calculation, is it possible to play it for a variable in MS SQL 2008 or something like that? example:
SELECT
@test = (SELECT COUNT(*) FROM [tableTest] WHERE [tableTest].[columnA] = [tableA].[columnA]) as 'Counter'
, (@test * 50) as 'Calc'
, [tableA].[columnA]
FROM tableA
My question has been answered in the English version:
 <http://stackoverflow.com/questions/27783554/mssql-subquery-result-to-show-and-calculate/>
– AndrehOdon
And received a similar reply in Portuguese too! : D
– gmsantos