Tags » CHARINDEX

Extract string before a special character

Here is an easy way to get (extract) all of the characters before a special character in a string.  In our example we have a listing of email addresses and we want to get the name before the @domain. 241 more words

Hints And Tips

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