I love my job because I get to help people learn new technology as well as help them clear their confusion about the older technology. Recently during SQL Server Performance Tuning Practical Workshop, I was asked a very simple but interesting question by an attendee about NVARCHAR column.
Question: How to Trim TIME Part in DATETIME Values?
CONVERT function can be used to change the format of DATE to various formats like MM/dd/yyy, dd/MM/yyy, yyy/MM/dd, etc. But have you ever noticed that this will produce resultset with a different order if the alias name is used in ORDER BY Clause? Well, I just learned about the formatted date from my recent consulting engagement Comprehensive Database Performance Health Check.
I love my job of SQL Server Performance Tuning and Optimization consultant as every single day I walk into the customer door (well, to be honest, it is actually virtual door of GoToMeeting), I face new challenges and learn new ways to tune SQL Server. In this blog post, we will discuss Query to Find the Longest Running Function.
In my very old post SQL SERVER – Query to Find First and Last Day of Current Month – Date Function, I had explained how to find the first day and last day of the current date.
Question: Which is Optimal – TOP 0 OR WHERE 1 = 2?
Answer: They both are the same!
I got an email from one of my blog readers asking for an easy way to identify if a given string contains only alphabets. There can be several methods to do this. One simple method is to make use of a regular expression. Let us see how we can retrieve rows with the all alphabets from Alphanumeric Data.