Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,
I want to write a function in ms sql , but it wont return any thing, and i want to call it in another query.But i am not getting how to write a function without return type.If it is possible then pls help me.
Thanking you.
Posted

The whole point of a function is to return something. If it returns nothing, why do you want to call it ? You can return whatever you like, if you're going to ignore it, surely ?
 
Share this answer
 
Comments
Toniyo Jackson 25-May-11 6:11am    
Good Call +5
There is no option to create a Function, without return values. Just think what you will achieve by calling void UDF in another query.

Think about CTE (Common Table expression) in SQL server & replace the UDF with a CTE
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900