Tags » CHARINDEX

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

Get Hostname from FQDN

When working with a view or table, there may a need to extract the hostname from a fully qualified domain name (FQDN) column value. Below is a case statement that can be used to obtain the hostname. 117 more words

SQL