Q&A about the site for developers and users of Stellar and the Stellar Distributed Exchange
DECLARE @InvoiceNo nvarchar(MAX) SET @InvoiceNo='10,1,2,3,4,5'; declare @n as int; select @n = len(@InvoiceNo) - len(replace(@InvoiceNo, ',', '')) + 1; select @n;