Tags » CHARINDEX

Using Charindex + Cross Apply to split delimiter-separated values (SQL Server)

Let’s suppose that we have some┬ádelimiter-separated values, like this:

We want to separate the delimited values into five columns, like this:

We can solve this using the following code: 124 more words

SQL Server Transact-SQL

Transact SQL - XML Column Hidden In SUBSTRING

Background

Found a query that was causing SQL Server timeouts, let us see if we can unpack it a bit.

Code

Original Code

Here is a quick snippet… 1,292 more words

Microsoft