I have an output parameter @Counter and a temporary table #tmpUsers
@Counter
#tmpUsers
Is it possible to assign a value
SELECT COUNT(*) FROM #tmpUsers
To the output parameter of @Counter ?
I tried
SET @Counter = SELECT COUNT(*) FROM #tmpUsers
But this does not work for me
Try as follows:
SELECT @Counter = COUNT(*) FROM #tmpUsers
or
SET @Counter = (SELECT COUNT(*) FROM #tmpUsers)
Source: https://habr.com/ru/post/1495506/More articles:Windows named feeds in practice - pythonUnable to include file in NASM - assemblySignalR 2.0.0 beta2 IJsonSerializer Extension - jsonR - obtaining the distribution according to the histogram - rHow to create a real-time ad server - architectureWhere to store resource URIs in the REST API - resthow to get systemc sc_module_name of the current current module - c ++TransactionScope v SQLTransaction - .netGetting the first month of a month from a given datetime dosenot save the time component - phpAdvantage of "Delay creating thread to desired" option in Jmeter - jmeterAll Articles