Showing posts with label Sql Server. Show all posts
Showing posts with label Sql Server. Show all posts

Wednesday, September 24, 2014

How To return String into Delimited String in SqlServer and With Good Example Using "IN Clause"



As we know sql queries are Dynamic and Nondynamic queries.This example is for Non dynamic query.


For spliting string into delimited string we use Function in sql server .


Ex: @string nvarchar(max),
       @splitedstring nvarchar(max)
       set @string='word1,word2 '
       Result:@splitedstring ='word1','word2'