SQL Coding
Find out Which View Columns can be Indexed
Indexed views are the topic of an article that I’ve written. It was published last week on DatabaseJournal. You can see it at: http://www.databasejournal.com/features/mssql/article.php/2119721 You probably got the special notice that I sent last week when it was…
Transact-SQL User Defined Functions – PDF available for free
It was written quite a while ago but if you’re starting out using functions in T-SQL, it’s still a good resource. Except for the section on system UDFs the rest of the book remains correct. There just haven’t been that many changes in how functions work since SQL…
Retrieving a Random Record in SQL Server using udf_Num_RanInt
This UDFs week solves a problem posed to me last week by a friend Gary. Gary wants to select a random row from one of his tables and was hoping that SQL Server would have some support for this task. The idea of selecting a random row runs counter to the ideas that…
The Problem with User-Defined Functions (UDF) and a Solution
Download the sample script: Problem-Scalar-UDF-and-solution-andy-novick and a PDF of the slides: The Problem with scalar UDFs and a solution – Andy Novick Or watch the video on Youtube: https://www.youtube.com/watch?v=OAdFQm7Pt-w User-Defined functions (UDF)…