Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In Over My Head With A Scalar-Valued Function
Message
 
 
À
23/12/2009 21:31:15
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01440468
Message ID:
01440481
Vues:
24
>Can you reference a function from another function? In this case the system has default labor rates based on the type of labor for each entry. There can also be rates specific to each job. If there are not job specific rates then the system defaults are used. I think I also need to create a function to return the correct rate.
>
>TIA
>Jeff

You can call some system defined functions. You can call UDF from UDF.

Here is a quick test:
-- Test query
create function fn1()
returns int
as
begin
       return 1
end
GO
create function fn2()
returns int
as
begin
       return dbo.fn1() * 2
end
GO
print dbo.fn2()
drop function fn2
drop function fn1
Thanks to my friend I consulted quickly with.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform