hi Roy create an after trigger to do that after trigger will fire after the insert to create the after trigger just fo
CREATE TRIGGER TriggerName ON MyTable
AFTER INSERT
AS ...
This only works for SQL 2000 not 7.0
>Hi,
>
>I have this problem (using SQL2000):
>
>I have 3 fields in a table
>
>cCode_id CHAR(10) -- primary key
>cAccount_id CHAR(2)
>nAccount_num INT (set as an identity key)
>
>when I save the record (I'm using a VFOX 8 app) I need to update the cCode_id WITH the values of the cAccount_id and the nAccount_num, so basically cCode_id+"-"+C0NVERT(nAccount_num AS char(8)).
>
>It seems the insert trigger would be a good choice but have to take into account that there's an identity key, anybody know of a good technique to do this?
>
>basically when I save if I have:
>cAccount_id
>RH
>
>nAccount_num
>8 - (note that this is an identity key)
>
>Then the value for cCode_id:
>RH-8
>
>Thanks.
Alexandre Palma
Senior Application Architect