I published an article Divide the rows in equals batches few days ago. One of my reader requested me to help him with a requirement to divide a column's data in equal groups and batches in grid format. I came up with a script which accepts the dynamic group size and divides the column data … Continue reading Divide the rows of a column in equals batches in grid format
Author: Brahmanand Shukla
Divide the rows in equals batches
Here is a simple and practical use-case of the NTILE function. We've used it to divide the rows of sys.columns into N groups. N is the number of groups. We've used the number of groups as 7. So the entire rows will be aligned equally to any of the group between 1 to 7. When … Continue reading Divide the rows in equals batches
Get the month end dates of last N years
Here is a simple T-SQL script that may come handy if you need the month end dates of last N years. N is the number of years. /* Assign the dynamic number of years here. You can write a procedure / table-valued function to accept this value as a parameter. */ DECLARE @Last_N_Years INT = … Continue reading Get the month end dates of last N years
Get the month end dates of last N months
Here is a simple T-SQL script that may come handy if you need the month end dates of last N months. N is the number of months. /* Assign the dynamic number of months here. You can write a procedure / table-valued function to accept this value as a parameter. */ DECLARE @Last_N_Months INT = … Continue reading Get the month end dates of last N months
SSIS Logging – Linking sysssislog with custom log
I was working on an ETL solution, which was expected to run for hours. It has become extremely important to track the errors properly, so as to debug the error quickly. During the initial phase, we had to struggle with the errors. I googled a lot to find a solution that can lead me directly … Continue reading SSIS Logging – Linking sysssislog with custom log