Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored proc as default?
Message
From
27/10/1999 09:17:54
 
 
To
26/10/1999 16:11:50
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00281455
Message ID:
00282190
Views:
30
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform