Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a SQL User Defined Function
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00660414
Message ID:
00660823
Views:
9
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform