Search
 
SCRIPT & CODE EXAMPLE
 

SQL

split string from comma in sql

SELECT value FROM tbl_RuralPopulation CROSS APPLY STRING_SPLIT(panchCode, ','))
Comment

split string by comma in sql server

CREATE FUNCTION Split
(
  @delimited nvarchar(max),
  @delimiter nvarchar(100)
) RETURNS @t TABLE
(
-- Id column can be commented out, not required for sql splitting string
  id int identity(1,1), -- I use this column for numbering splitted parts
  val nvarchar(max)
)
AS
BEGIN
  declare @xml xml
  set @xml = N'<root><r>' + replace(@delimited,@delimiter,'</r><r>') + '</r></root>'

  insert into @t(val)
  select
    r.value('.','varchar(max)') as item
  from @xml.nodes('//root/r') as records(r)

  RETURN
END
GO
Comment

sql split comma separated string into rows

sql split string
Comment

PREVIOUS NEXT
Code Example
Sql :: sql select data from one database and insert into a different database 
Sql :: sql script to delete duplicate records in a table 
Sql :: remove accented characters in bigquery 
Sql :: where sqlalchemy 
Sql :: adonisjs ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: How to do IF NOT EXISTS in SQLite 
Sql :: module operator in oracle sql 
Sql :: how to select the lowest values from table per client sql 
Sql :: sql stored procedure for access frontend 
Sql :: mysql install windows 10 
Csharp :: count number of enum values C# 
Csharp :: read text file to string c# 
Csharp :: wpf round button 
Csharp :: c# check if type implements interface 
Csharp :: c# textboxaccept only numbers 
Csharp :: c# save bytes array to file 
Csharp :: c# new thread 
Csharp :: unity play particle system 
Csharp :: unity check for internet connection 
Csharp :: c# unix timestamp 
Csharp :: get scene name unity 
Csharp :: dotnet executable directory 
Csharp :: c# winform remove button border 
Csharp :: get request url in asp.net core 
Csharp :: c# remove non-alphanumeric characters from string 
Csharp :: random value in array c# 
Csharp :: unity string format time 
Csharp :: c# take first 4 characters of string 
Csharp :: c# debug console log 
Csharp :: untiy delet ke 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =