Re: Are UDFs in queries a bad idea?
A UDF is sometimes the fastest way to go for a mathematically oriented operation. It was a bizarre case, only happened once, but I had to compute some advanced statistical values for a Binomial Distribution and there wasn't one in any library I could find - so I had to roll my own as a UDF. Actually, despite the fact of it being interpreted rather than compiled, I was able to find "telescoped" functions that would help me speed up the computation.
I think that, like many other things we do, the ability to use a UDF should be a tool in the tool-kit, used when appropriate. We have to be mindful of the fact that if you only have hammers in your tool-kit, everything looks like nails.
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.