Any way to ensure to tasks in different ForLoops dont execute at same time?

  • I have 2 dataflows that update the top 100k rows (A column called status to ready from staged), then selects them. After the load it updates the rows status column to loaded. these dataflows are in 2 different forloops. Is there any way to make them wait on each other if one is running? The update portion is locking and causing a locking error.

  • fixed the issue using the following

    UPDATE Top(1000000) s

    SET [Status] = 'Ready'

    FROM [dbo].[G_ASM_Submission_Staging] AS s WITH (NOLOCK)

    where [Status] = 'Staged' and [Batch_Group] = @Batch_Group

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply