Category: SQL Server

Pseudo Code for batch processing using WHILE LOOP

  Leveraging WHILE LOOP

Advertisements

Split data into N equal groups

In this blog post, you will get the query to "Split data into N equal groups" using SQL Server and you will also see the practical implementation of the following important topics of SQL Server. Happy learning ! 1) Ranking Functions (ROW_NUMBER() and NTILE()) 2) Local scoped temporary/hash table 3) CTE (Common Table Expression) 4) … Continue reading Split data into N equal groups

Leveraging WHILE LOOP

WHILE LOOP can be used for batch processing and can be helpful if you are dealing with huge data processing. Recently I did an analytics project where I had to iterate through 70K customers and generate the Monthly, Last One Year and Since Inception returns of all the customers and their respective benchmark index since … Continue reading Leveraging WHILE LOOP

Best practices for Stored Procedures in SQL Server

Read the following blog post for Best Practices to be followed for designing the tables in SQL Server. Best practices for designing tables in SQL Server SET NOCOUNT ON should be there at the beginning of Stored Procedure. SET TRANSATION ISOLATION LEVEL READ UNCOMMITED should be there at the beginning of Stored Procedure unless you … Continue reading Best practices for Stored Procedures in SQL Server