Sometimes you may not be able to see the characters in your data in SQL Server Mangement Studio (or another application). This simple function will allow you to pass an input string in, and it will return the individual characters as rows from a Table Valued Function. First the code: if object_id('...
If I've seen it one time, I've seen it a hundred times. People trying to sort views by selecting 100 PERCENT in a view with an order by. Because after all, if you try to use an order by statement, without a TOP statement, you will get the following error. Msg 1033, Level 15, State 1, Procedure...
User defined functions have many uses in SQL Server. Functions are useful to help clean up complex string manipulation logic in other areas of code and many other things. But convenience is not free. There is overhead in using functions and we will go over that later in the article. There are two types...
A table valued function is a function that returns a table instead of a single value. In this post, we will go over the Table Valued Functions in more detail than we did in the general topic covering User Defined Functions . There are many uses for table valued functions so we will go over a couple of...
In this article, I will show you how you can convert a delimited string of data into a table of data. In order to do this we will use a table valued function. There are many ways to achieve this but this how I like to do it. In order to use the function, you will need a numbers table. Since that's...