Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logic problem
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Logic problem
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01337628
Message ID:
01337628
Vues:
45
Hi everybody,

I have a stored procedure that accepts lots of parameters and called PeopleInsert. I have another procedure that is called SaveApprovedPeople.

In the SaveApprovedPeople procedure it first updates registration table (sets status to approved) and then inserts into People and related tables information from registration table. The logic of insert should be the same as PeopleInsert (except that instead of parameters I'm using Registration table record).

My question is - how should I somehow incorporate the logic of one procedure into another? Because I found that there is no error checking in SaveApprovedPeople and we have at least 2 business rules - no same userID and no same people to be inserted.

These rules I currently have implemented inside the stored procedure - may be this is my error? May be I needed to implement them as triggers?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform