Error with SQL stored procedure output type
This row causes your error:


SET @aux='SELECT '+@nmae



Since @nmae is DECIMAL(20,5) there is no way to make a sum without converting, and thanks to type precedence, it's string SELECT that should be converted to numeric, and this is impossible.

Here is quick repro:

declare @nmae DECIMAL(20,5); 

DECLARE @aux VARCHAR(MAX)='Hello'

SET @aux='SELECT '+@nmae;

exec(@aux);


To see what is converted to what you can use this query:

select '2' + 2


this will not produce '22', but 4, as it's tring '2' to be converted to numeric, not viceversa.

UPDATE

You can use synonym to get rid of all your dynamic code like this:

declare @forecasttype VARCHAR(MAX) = 'DAH'
declare @sql varchar(8000) = 'create synonym dbo.MySyn for ['+@forecasttype+'_Errors]';
exec(@sql); -- this will create MySyn that points to your table


Now you can use the created synonym instead of your table:

SELECT @nmae=AVG(ABS([MySyn].[Forecast]-[MySyn].[Metering‌​])/CAST([MySyn]‌​.[Capacity] AS DECIMAL(20,5))) from dbo.[MySyn]


And it's even better create an alias to not rewrite table name every time in the select:

SELECT @nmae=AVG(ABS(s.[Forecast]-s.[Metering‌​])/CAST(s.[Capacity] AS DECIMAL(20,5))) from [MySyn] s


At the end of sp just drop the synonym.

You should be sure that this sp is not executed at the same time by more than 1 user, if it's so you need other solution