Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reached the capacity of the engine of SQL !!!
Message
De
24/07/2016 05:24:49
 
 
À
23/07/2016 12:37:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Virtual environment:
Hyper-V
Divers
Thread ID:
01638561
Message ID:
01638572
Vues:
72
>>
>>99% 10 records,
>>but in rare cases can be 10,000.
>>The procedure performs one operation of the operator ( save document ),
>>then pay price microsecond almost always
>>and gain a few seconds in the worst case improves
>>his experience in the use of the application.
>
>Can you post the code? I didn't see the code in the screen shot. Maybe I am missing something here.
....
DECLARE @DO_R TABLE (	id_#DO_R		INT	PRIMARY KEY
		,	id_DO_R			INT  -- PRIMARY KEY  works here !!!
		,	l_MA_Carico_Old	SMALLINT	)

	MERGE dbo.DO_R U
	USING (SELECT	#DR._action ... ) S
...
	OUTPUT INSERTED.id
		,	S.id
		,	CASE WHEN	DELETED.d_Movimento IS NOT NULL
					AND ISNULL(DELETED.l_MA_Dare,0)<>ISNULL(INSERTED.l_MA_Dare,0)
				THEN ISNULL(DELETED.l_MA_Dare,0)
			END	-- 0 indica il NULL NULL indica che dare non è il nuovo avere
		INTO @DO_R 
		(	id_DO_R
		,	id_#DO_R
		,	l_MA_Carico_Old
		);
...
the error occurs at compile time.

On the same procedure, (2000 lines),
there are others table variables with primary key and merge,
and they work!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform