Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a SQL User Defined Function
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00660414
Message ID:
00660823
Vues:
8
>I thought I could as part of the UDF. The problem is, I don't know what the syntex of the UDF should be. I thought a UDF would be good here, otherwise I have to include the CostBeforeCf and CF in the grouping clause.

Here's is an example.
CREATE FUNCTION UnitCost  (@CostBeforeCF Decimal (9,2), @CF int )
RETURNS CHAR(20)
AS
BEGIN
   RETURN CAST( CAST(@CostBeforeCF / @CF AS Decimal (9,2)) AS char(20))
END
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform