.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

SQL Where IN()

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :ASP.Net
 
Hi all, im passing one input parameter to the SP, based on that parameter i have written the code like below create procedure SP1(@inpName varchar(10)) declare @where varchar(20);if @inpName = 'ABCD' @where = 'A';else if @inpName = '1234' @where = '1';else if @inpName = 'AB12' @where = 'A,B'; SELECT * FROM TABLE1 WHERE COLUMN1 IN(@where); Now the above query was fine if its 'ABCD' or '1234', but if its 'AB12' then query failed.How to resolve this issue.?


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend