Wednesday, January 23, 2013

Use string type comma separated in IN clause in sql

 declare @ProductIds nvarchar(50)='18,19'
SELECT * FROM products Where (',' + @ProductIds +',' LIKE '%,' + CONVERT(VARCHAR, ProductId) + ',%')

No comments:

Post a Comment

ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...