Note that there are some explanatory texts on larger screens.

plurals
  1. PONo solution to a warning when executing a stored procedure? "Warning: Null value is eliminated by an aggregate or other SET operation"
    primarykey
    data
    text
    <p>I get the warning "Null value is eliminated by an aggregate or other SET operation." and I cannot find the source of the problem. The code is below, what I basically want to do is to insert values in a table, based on the execution of 33 stored procedures (the coding for the execution is the same, so I give just a few examples below). I have looked for errors in the invoked SP, but found none since they all return the expected results based on test files.</p> <p>Any suggestions for a solution?</p> <p>CODE:</p> <pre><code> ALTER PROCEDURE [dbo].[SKL_SaveAdminKontroll_result] AS BEGIN SET NOCOUNT ON; declare @SQL VarChar(max) set @SQL = ' DELETE FROM [dbo].[SKL_AdminKontroll_result] DECLARE @kommuner VARCHAR(300) DECLARE @landsting VARCHAR(300) DECLARE @tableName VARCHAR(100) SET @kommuner=''select id from [StatistikinlamningAdminSKL].[dbo].[Enhet] WHERE [EnhetsTyp] = 1'' SET @landsting=''select id from [StatistikinlamningAdminSKL].[dbo].[Enhet] WHERE [EnhetsTyp] = 2'' SET @tableName=''GR_PS09_1'' INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_KN_aform @tableName, @kommuner INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_KN_annan_AID @tableName, @kommuner INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_KN_ansvar @tableName, @kommuner INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_LT_aform @tableName, @landsting INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_LT_annan_AID @tableName, @landsting INSERT INTO [dbo].[SKL_AdminKontroll_result] ([Värde],[Typ],Enhetsid,Adminkontroll,[Datum för hämtat värde]) EXEC dbo.SKL_admin_LT_ansvar @tableName, @landsting ' EXEC (@SQL) END </code></pre> <p>Best regards,</p> <p>Hannes</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload