Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning values to a column with a UDF
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00886693
Message ID:
00886699
Vues:
14
I'm not sure where you want to put result of GetQuartID() function but can you use a trigger?

>It's been a while... since I last played with SQL Server 2000
>
>Ok here is a simple problem: I want to assign a value to a column at insertion time.
>
>TABLE:
>
>ID int indentity
>DH_Creation datetime default Getdate()
>QuartID int (FK to the Quart table)
>....
>
>I have a UDF named GetQuartID(@TRX_datetime), that returns an integer based on the passed argument (in this case, another column (DH_Creation) will be the argument)
>
>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...
>
>How do you that ?
>
>Thanks.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform