Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Trigger
Message
De
23/04/2003 10:45:34
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Insert Trigger
Divers
Thread ID:
00780597
Message ID:
00780597
Vues:
43
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform