I want get the value from Exec(@sql)
and assign to @Rowcount(int)
Here is my query:
'SET @RowCount = (select count(*)
FROM dbo.Comm_Services
WHERE CompanyId = '+cast(@CompanyId as char)+' and '+@condition+')'
See Question&Answers more detail:os