Delimited Strings

Technical Article

Extract values from a string using a delimiter

  • Script

There are many occasions in programs where you need to manipulate strings of characters that are delimited by a particular character, such as a comma, or a space. This function enables you to extract a substring from the string at a specified occurence of the delimter. declare @Data varchar(255) set @Data = 'A,B,C,D,E' print dbo.field(@data,',',2,2) […]

4.17 (6)

You rated this post out of 5. Change rating

2011-11-28 (first published: )

2,607 reads

Blogs

Query multiple Azure SQL Databases

By

I was sick of changing context in Azure Data Studio while cleaning up things...

KDA: Echoes of Deception - Case 3

By

The crime spree in Digitown is not ending. This time 20 cars have been...

The Book of Redgate: Do Your Best Work

By

One of our mission statements in the Book of Redgate says: attempt to do...

Read the latest Blogs

Forums

Shining a Light on Shadow AI - Responsible Data Protection When AI is Everywhere

By dbakevlar

Comments posted to this topic are about the item Shining a Light on Shadow...

CAST(VARCHAR(n)) resolved performance issue?

By mikael_ljunghorn

Hi, I would love to hear if anyone can tell me why a CAST...

isnull, coalesce overhead

By stan

hi, one of our sister division's erp extract view is going thru at least...

Visit the forum

Question of the Day

The Internals of Writing a Page

In SQL Server, when the buffer manager write pages to disk, page protection is added to the pages. There are two types of protection: torn page protection and checksum page protection. What happens with regards to concurrency with page protection during writes?

See possible answers