We have seen several examples of writing recursive queries in the earlier blog posts. For a quick recap, you can find some of those posts in the list given below. TSQL Lab 10 - Performing recursive updates in SQL Server TSQL Lab 11 - Writing a recursive procedure to update the count of chil......

I have always experienced and am convinced that, while learning a programming technique, it is more helpful to see an example that matches our specific requirement, rather than some theoretical stuff. Examples are really good for learning the basics and then the theories will help us to go deeper in......

How to retrieve first 50 records from a tableOptions:1. Using TOP Command2. Using ROW_NUMBER() function3, Using both TOP and ROW_NUMBER()4. OthersANSWER: ____________Hi all,FILL IN THE BLANKS Series is a kind of posts related to objective type questions...

Assume that you have two identical tables in different servers. The table in production server has 100 million rows and the table in test server is empty and you want to transfer data from production server into test server to do some analysis based on ...

In this post we would see one of the bad practices very commonly followed by developers which is risky as without our knowledge data would have got truncated before getting inserting into the table!...

There was a question in the forums where a user asked for a solution to find out the number which is succeeded by the last 0 in that number
For example, in numbers like 10807023 and 1000508, 23 and 8 are the numbers which are succeeded by the last 0 of...

I am back from vacation, and have spent a couple of weeks catching up my workload. Now I am ready to finish the SQL Server BI Quiz “Mass Mailing Your Report”.
Here is my original blog, SSRS #55 - SQL Server BI Quiz “Mass Mailing Your Report”. Thanks to the following re......

<p align="justify"><font color="#000000" size="2">Over the short span of my career, I have seen many people get burnt out and change their careers from technology to some other field. It is easy to get disillusioned with a job that requires you to sit on a chair the entire day and "code" t......

One of the common questions I encounter in the different SQL related forums is "How to search all columns in all tables in the database". My usual answer is to refer people to the Question #2 in this blog The ten most asked SQL Server questions. However, the recent thread in MSDN forum forced me to ......