Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto calculations
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00518612
Message ID:
00518669
Vues:
14
Hi Keith.
In SQL2000, you can create a user defined function. An example would be:

CREATE FUNCTION add_columns (@number1 int, @number2 int)
RETURNS int
AS
BEGIN
RETURN (@number1+@number2)
END

To use this as a calculated column, open the design window for your table in Enterprise Manager. Add a new column and use the 'formula' property to call the function like this:

([dbo].[add_columns]([column_name1], [column_name2]))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform