Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored proc as default?
Message
De
27/10/1999 09:17:54
 
 
À
26/10/1999 16:11:50
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00281455
Message ID:
00282190
Vues:
31
You can put something like this in a stored procedure and provide some functionality to call it in the front end:

----------------------------
CREATE PROCEDURE ChangeTaxRate @newrate decimal AS

IF OBJECT_ID('dbo.CurrentTaxRate') IS NOT NULL
EXEC sp_unbindefault 'CurrentTaxRate'
DROP Default dbo.CurrentTaxRate

CREATE DEFAULT dbo.CurrentTaxRate AS @newrate
EXEC sp_bindefault 'dbo.CurrentTaxRate', 'Customer.TaxRate'
----------------------------

I just kind of made it up on the fly so if you find this approach useful you will have to fiddle with it a little.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform