|
|
-
|
|
My friend and SQL Server MVP, Pinal has wrote a wonderful post warning people who rename their stored procedures, functions, views and triggers. You can find his post here.
The problem is that, when you rename a stored procedure, function, view or trigger, the name in [sys].[syscomments] table is ......
|
|
-
|
|
In a previous post we discussed how to perform a recursive update on the category table to display the number of items each category contains. A category may contain other sub-categories and they in turn might contain sub-sub-categories. We need to update each parent category with the total count of......
|
|
-
|
|
We have seen a number of posts on various string operations using XQuery functions and FOR XML operator. This post explains how to match a delimited string against another delimited string. I wanted to share a piece of code that I wrote to help a member of our User Group. I found it to be very int......
|
|
-
|
|
We have seen a number of posts on various string operations using XQuery functions and FOR XML operator. This post explains how to match a delimited string against another delimited string.
I wanted to share a piece of code that I wrote to help a member of our User Group. I found it to be ver......
|
|
-
|
|
In the previous lab we discussed the limitation of a recursive stored procedure. You cannot perform recursion for more than 32 levels. I promised that in the next post, I will show you a new version of the stored procedure that works for more than 32 levels. Before I jump into that, I would like to ......
|
|
-
|
|
In the previous lab, we discussed a use case where we need a recursive procedure to update the count of child items under each parent category. Let us try to achieve this by using a recursive stored procedure.
Let us write two stored procedures to achieve this. The first stored procedure will loop......
|
|
-
|
|
In the last UG meeting, we discussed recursion and recursive CTE in great detail. We saw a few real life examples that use recursion. In this post, I would like to present one more real life example where we might need a recursive procedure. Here is the problem we are trying to solve.
Assume that w......
|
|
-
|
|
One of my colleague needed a piece of code that returns all the dependent objects of a given database object. His project has a separate reporting server to which the data from primary database is replicated. He creates the database objects needed for the reports (stored procedures, functions, views......
|
|
-
|
|
In the previous post we discussed the logic we will apply to write the function that compares two XML values. We will write a function that accepts two XML variables and will compare elements and attributes as per the logic we discussed in the previous post. I look forward to hear from you......
|
|
-
|
|
In the previous lab, we saw how to write a loop to process all the attributes of an element. We then discussed how to find the number of child elements that a parent element has. We also discussed how to retrieve a child element at the specified position. That is all we need to write a piece......
|
|