0

Hello all,

Are UDFs written only on SQL Analyser in within the SQL?
Can we use them in programming code?How to use them in the code?
What are the actual benefits of UDFs?
We can write the method in the code and connect to the database and execute which yeilds same results! Then why are UDFs used for?
Can someone solve my doubts pls.

Thankyou.

2
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by csharplearner
0

1- Depends on your version but it doesn't make any difference.
2- Yes calling UDF like SP, search how to use it in .net
3- Pre-compiled queries, you can use some logic (splitting strings, some calculations, etc..)
4- In some situations you'd better to write UDF than programming code.
haa, discuss me if you're convinced.

0

1- Depends on your version but it doesn't make any difference.
2- Yes calling UDF like SP, search how to use it in .net
3- Pre-compiled queries, you can use some logic (splitting strings, some calculations, etc..)
4- In some situations you'd better to write UDF than programming code.
haa, discuss me if you're convinced.

Can you tell me few examples fr the situations u said.

1

If you have string like that in table "lmlmlaa,lmlmlaa, lmlmlaa, lmlmlaa" and need to return it as table
ID text
1 lmlmlaa
2 lmlmlaa
3 lmlmlaa
4 lmlmlaa
and you may also do some operation on this table, what do you see is to handle this in C# or UDF?

Votes + Comments
tnx fr ur time
0

If you have string like that in table "lmlmlaa,lmlmlaa, lmlmlaa, lmlmlaa" and need to return it as table
ID text
1 lmlmlaa
2 lmlmlaa
3 lmlmlaa
4 lmlmlaa
and you may also do some operation on this table, what do you see is to handle this in C# or UDF?

So, basically we use these UDFs to retrieve /create/add data from the tables in the database within the query analyser of the database.
We can only make use of this data only by passing it into another table created exclusively to store the result and later get it displayed through the normal code in the program.
Pls correct me if i am wrong and missing something..

thanks..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.