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

CHARINDEX, LEN, and RIGHT - A winning combination for a partial join

Today I needed to join two GUIDsĀ in order to audit login events in a Microsoft CRM database. The problem is that the first block of digits was not the same between the two database tables. 109 more words

T-sql