i want to create trigger at the row level to modify a field in each record that is inserted..
i do not have a primary key on my table...
the code that doesnt work is below..
CREATE TRIGGER tr_msisdn_ProcessedRedemption
ON ProcessedRedemption
FOR INSERT
AS
UPDATE ProcessedRedemption
SET msisdn ='0'+ RIGHT((select msisdn from inserted),10)
where (msisdn=(SELECT msisdn FROM inserted))
1) do i need to put the WHERE clause?
2) can someone show me where/how to correct my code?
thanks a million.
i do not have a primary key on my table...
the code that doesnt work is below..
CREATE TRIGGER tr_msisdn_ProcessedRedemption
ON ProcessedRedemption
FOR INSERT
AS
UPDATE ProcessedRedemption
SET msisdn ='0'+ RIGHT((select msisdn from inserted),10)
where (msisdn=(SELECT msisdn FROM inserted))
1) do i need to put the WHERE clause?
2) can someone show me where/how to correct my code?
thanks a million.