STRING_SPLIT in SQL Server 2016

Hello Friends,

In continuation to my previous post, I’m going have chosen another function from SQL Server 2016 to put forward here.

New STRING_SPLIT() function in SQL Server 2016 to split a string into multiple values & rows. Function returns table from a string parameter

Type of Parameter : VARCHAR, NVARCHAR, CHAR and NCHAR

Count of parameters: 2 (Two) – string and separator. It returns a table.

Accept NULL or BLANK: NO

In case of passing NULL OR BLANK parameter it will throw an error, listed below.

screen-shot-2016-10-24-at-1-42-57-pm

SYNTAX:

STRING_SPLIT(string,separator)

Here is quick example, how it works.

   

screen-shot-2016-10-26-at-6-11-46-am

Sorry about RED mark under function, something malicious in my environment. 🙁

Happy Learning!

Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook

Follow Avanish Panchal on Twitter | Follow Avanish Panchal on FaceBook

 

   

About Avanish Panchal

Avanish carries around 15 years of experience in IT industry. He is post graduate in Computer Science, followed by Masters in Business Administration. He has worked on multiple technologies like SQL Server, .net & Sybase with world largest bank(s)/IT consulting firm(s) like JPMorganChase, CapGemini, Datamatics etc. Currently holds position of Database Architect in BioPharma Global Leader. His area of focus are SQL Server DB Engine, Security, Storage, Virtualization & Infrastructure Consolidation. Passionate for delivering Database IT Infrastructure to satisfy and exceed the needs of the enterprise. You may find him active on various forums like SQLBangalore, SQLServerGeeks & many more. His SQL Server passion helped him to be the Core Team member of Asia's First SQL Server Conference in 2015 @ Bangalore (#SSGAS2015).

View all posts by Avanish Panchal →

Leave a Reply

Your email address will not be published.