MySQL supports some functions that can be used to extract the index position or the actual value from a set of values arranged as an array. ELT() and FIELD() are example of such functions. Let us understand about them in details.
SQL SERVER – How to Remove All Characters From a String Using T-SQL?
In the recent past I have seen the best interaction and learning happens when we all get into a puzzle and challenge mode. And that just gets the creative juice in our minds and some really innovative solutions are given. So this blog is written like a nice trivia solution…
Read MoreSQL SERVER – CONCAT function and NULL values
CONCAT is the new T-SQL function introduced in SQL Server 2012. It is used to concatenate the values. It accepts many parameter values seperated by comma. All parameter values are concatenated to a single string. A simple example is SELECT CONCAT('SQL Server',' 2012') which results to SQL Server 2012 The…
Read MoreInterview Question of the Week #008 – Write Scripts to Convert String to Title Case or Proper Case
Just received a question in an email asking questions about how to Convert String:
“I just got out of the interview and I was asked to write scripts to convert a string to Title Case. I was also asked to refer to the website over here to validate my answer after I complete writing script.
Do you think it is not fair to ask such questions in an interview?”
SQL SERVER – Script to Find Strings with Same Characters
One of my blog followers asked me if it is possible to check whether all the characters of a column value is same. For example if there are values like KKK and KKT, the value KKK should be the output as all characters are same. There is a method without…
Read MoreSQL SERVER – Reverse String Word By Word – Part 4
Earlier I wrote a blog post about SQL SERVER – Reverse String Word By Word. SQL Server Expert Sanjay Monpara and Yuri Petrov contributed to the blog post with their excellent script which I have blogged earlier. In this blog post we will see a similar script by SQL Expert Paul G. He has essentially sliced…
Read MoreSQL SERVER – Reverse String Word By Word – Part 3
Earlier I wrote a blog post about SQL SERVER – Reverse String Word By Word. SQL Server Expert Sanjay Monpara wrote a great comment to the blog post where he has proposed alternate solution. Right after the solution of the Sanjay, another expert Yuri Petrov suggested a modification to the script. In this blog…
Read More