Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning values to a column with a UDF
Message
De
16/03/2004 11:49:08
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00886693
Message ID:
00886729
Vues:
10


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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform