Monthly Archives: March 2015

t-SQL to find top X toppers in each subject from marks table

rank() function in SQL can be used to find such results in SQL! Here is the simple example for FUN 🙂 Reference/ New features in SQL 2012: https://vijredblog.wordpress.com/2014/02/18/tsql2012-less-frequently-used-features-revision-01/

Posted in Script, SQL, SQL Query | Tagged , , , | Leave a comment

SQL Code snippet to join First, Middle, Last Name and handle NULL values

Posted in Script, SQL, SQL Query | Tagged , , | Leave a comment

PowerShell06- PowerShell result display options

PowerShell developers needs to analyze the commands and results many a time, it is good to know how the results can be formatted for better visibility. I will share few examples which can be used for reference… • Get-Process | … Continue reading

Posted in Learn_Powershell, Powershell | Tagged , , | Leave a comment

UPSERT in SSIS

I had a work on a quick delivery which involves UPSET using SSIS, following is refresh! What is UPSERT in typical scenario? When I have to insert records into destination if the record does not exist and/or update multiple values … Continue reading

Posted in Productivity, SQL, SSIS | Tagged , , , , | Leave a comment

PowerShell05 – PowerShell Prompt

Many a time I work on different files in different folders and change the prompt to different location. The challenge is the available space to write commands on single line. For simplicity, I will share simple function to move the … Continue reading

Posted in Learn_Powershell, Powershell | Tagged , , , | Leave a comment

Easy way to find DBAMP Errors from the Log (sf_replicate, sf_refresh, sf_replicateAll, sf_refreshAll Errors)

Typically sf_replicateAll, sf_refreshAll procedures log all activities in DBAmp_Log table on the same database. Now the challenge is… I see about 1200 records in the table for each execution of sf_refreshAll! It takes long to find the actual error! Simple … Continue reading

Posted in knowledge, Script, SQL, SQL Query | Tagged , , , , , , , | Leave a comment

PowerShell04 – Pipeline, Filtering, Grouping and Sorting examples

Pipeline: PowerShell pipeline takes the output from one command and sends it as input to another command. Simple Example: Sorting CmdLet results: Sort-Object -Property XXX can be used to sort the results in output Example to sort process information based … Continue reading

Posted in Learn_Powershell, Powershell | Tagged , , , , | Leave a comment