Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Trigger
Message
De
23/04/2003 10:53:42
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
À
23/04/2003 10:45:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Divers
Thread ID:
00780597
Message ID:
00780605
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform