You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use @assetId twice error is displayed
MERGE INTO [dbo].[AssetName] AS Target
USING (VALUES
(@assetId, 11, @ukrainianName, 5, N'Afroz Yadwad'),
(@assetId, 10, @russianName, 4, N'Afroz Yadwad')
) AS Source ([AssetId],[LanguageId],[InternalName],[OrderBy],[CreatedBy])
ON Target.[AssetId] = Source.[AssetId]
AND Target.[LanguageId] = Source.[LanguageId]
WHEN NOT MATCHED BY TARGET THEN
INSERT ([AssetId],[LanguageId],[InternalName],[OrderBy],[CreatedBy])
VALUES ([AssetId],[LanguageId],[InternalName],[OrderBy],[CreatedBy])
WHEN MATCHED THEN
UPDATESET TARGET.[InternalName] = Source.[InternalName]
;
Error
Incorrect syntax near 5
Expected behavior
The parameter name is reused and can be referenced more than once
What you can do
I am willing to contribute a PR with a unit test showcasing the issue
I am willing to test the bug fix before the next release
The text was updated successfully, but these errors were encountered:
I used to use this provider all the time, but it has been years. It cannot be upgraded to dotnet without a lot of work.
IIRC there is a workaround, which is to define a new @variable for each time it is used. You can do it within your script. Declare and set the second variable to the original variable submitted to the script.
Issue Summary
When I try to use
@assetId
twice error is displayedError
Incorrect syntax near 5
Expected behavior
The parameter name is reused and can be referenced more than once
What you can do
The text was updated successfully, but these errors were encountered: