• Use a DELETE in batches.

    DECLARE @i int = 1

    WHILE @i > 0

    BEGIN

    DELETE TOP (1000000) work.dbo.WRK_FACT

    where month >= @I and year = @year

    SET @i = @@ROWCOUNT

    BEGIN END

    Or if you have a trigger on the table that might alter @@ROWCOUNT value.

    WHILE EXISTS (

    SELECT TOP 1 1

    FROM work.dbo.WRK_FACT

    where month >= @I and year = @year

    )

    BEGIN

    DELETE TOP (1000000) work.dbo.WRK_FACT

    where month >= @I and year = @year

    BEGIN END

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2