Saturday, October 5, 2013

Count the Comma Separated Values in SQL SERVER

this is usefull when you write data like(abc,zxy)in table



SELECT
      LEN(field name) - LEN(REPLACE(field name, ',', ''))+1 total

From [your table name]



SELECT
      LEN(word) - LEN(REPLACE(word, ',', ''))+1 total

From dbo.test

No comments:

Post a Comment

Complete Authentication System in ASP.NET Core using JWT

JWT (JSON Web Token) authentication is widely used for securing APIs in modern applications. In this article, we will build a complete authe...