Well, I think we all at one point or another have been here, and frankly, I'm trying to figure a few things out with the nature of "Functions" in Transact-SQL (SQL Server 2008). I am the type of programmer that is more programmer than SQL scripter,
in the one fundamental nature that I don't like writing the same thing twice. Usually because I forget. You see a problem and want to solve it, but you can't exactly see the forest through the trees, and have to ask for help. Someone, usually
here, provides me with the insight I was looking for and I use it, walk away, 3 months later, I need the same help again. No I'm not so crass as to repost the same question, but I have to look it up again. So my theory, being as I said more the
programmer than scripter, I wanted to create a function that just does it for me. I add that function to the master database and voila, every time I need this <insert blah here> I can just run my function.
A perfect example is how I asked a while back how to create a Inline-randomizer, which basically would allow me to create a random number per line. With the way caching and execution plans work in most SQL Engines, using a simple: Select *,Rand() from
MyTable, will produce the exact same number each row for the Rand() function. It was explained why, havi
View Complete Post