The Inserted table will contain all of the rows that were modified. You don't need a cursor:
IF UPDATED(amount)
UPDATE table1 SET ... WHERE pk IN (SELECT pk FROM Inserted)
-Mike
>I would like to update all rows in table1 where the column amount
>had been updated, if column amount hasn't been updated go to next row.
>I would like to do this check UPDATE(amount) for each row in cursor. I think this code loop through all posts in inserted and not only the ones where amount had been updated. Can anybody give me a solution for this problem?
>
>
>CREATE TRIGGER tr_Name
>ON dbo.table1
>FOR INSERT, UPDATE
>AS
>
>IF UPDATE(amount)
>BEGIN
> DECLARE curInserted INSENSITIVE CURSOR FOR
> SELECT date, idnr, amount
> FROM inserted
> ORDER BY date
>
> OPEN curInserted
> FETCH NEXT FROM curInserted
> INTO @ldDate, @lcIdNr, @lnAmount
>
> WHILE @@FETCH_STATUS = 0
> BEGIN
> ....code...
>
> FETCH NEXT FROM curInserted
> INTO @ldDate, @lcIdNR
> END
>END
>
>
>
>
>Regards Jenny