Monthly Archives: August 2013

Split String in MySQL

The easiest way to split string based on the delimiter is using loop. But it is also the most inefficient way. The following is to demonstrate how to use a utility table number and a scalar function to split a … Continue reading

Posted in MySQL | Leave a comment

String concatenation gotcha

In SQL Server, there are a few ways to concatenate string values from a column in a table, e.g. using FOR XML TYPE method. The following example is another method we all use: USE tempdb; GO CREATE TABLE MyTestTable (id … Continue reading

Posted in SQL server | Leave a comment