Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning values to a column with a UDF
Message
From
16/03/2004 11:49:08
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00886693
Message ID:
00886729
Views:
9


How do I bind this default to the column ??? I tried in the design window to add this default to the column: dbo.GetQuartID(DH_Creation) but it doesn't seems to be valid...


SQL Server it is much less ambiguous and flexible than VFP,
and then it cannot use fields for compute default values of other fields
( for remove the order ambiguity, the insert it must be made in two phases ).

You have 3 ways:
a) change Quart table and remove the QuartID field
b) set QuartID as a computed field ( slow down the select )
c) use a after trigger that insert/update the QuartID when it is NULL or DH_Creation change ( if it can ).

a) is the best

Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform