Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Named Params To A Function

Status
Not open for further replies.

BenSCooper

Programmer
Sep 28, 2009
15
GB
Hi All,
I have a user defined function (SQL 2005) that expects a number of parameters. I'm wondering if there is any way to pass the params to this function by name, as is possible when calling stored procedures?
E.g. SELECT * FROM [FunctionName] (@Param1 = 'Value', @Param2 = 'Value')

It's not a huge deal, but I think it would make my coding slightly clearer and guard against passing params in the wrong order.

Many Thanks
Ben Cooper
 
how about calling it from a stored procedure


Create procedure

@pram1
@pram2

As

Select * from functionname(@pram1,@pram2)

Return
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top