Tag Archives: function

SQL Query to find employees with X Consecutive A Grades

One of my friend (Satya) asked a very interesting interview question during the Lunch today. Question is to write a SQL Query to find the employees who received Grade ‘A’ for 3 consecutive years. Self-join is the simple answer to … Continue reading

Posted in Productivity, SQL Query, SQL Server | 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

How to get greenwich mean time in SQL Server

GETUTCDATE() is the function to get Greenwich mean time… Just for fun…. If we want to get the same value without using this function? I have created user defined function as follows… -Vijred

Posted in Productivity, SQL, SQL Query | Tagged , , , , , | 2 Comments

SQL – Remove special Characters from string

I had a requirement to eliminate all the special characters except alphabets and numbers. The traditional way to handle it REPLACE( REPLACE( ‘#My &String’, ‘!’, ” ), ‘#’, ” ) was not helping as I need to list all possible … Continue reading

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