本文介绍了如何在stroed过程中使用'in'原因编写查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 大家好, i我在sql server中编写查询工作正常,但如何使用程序实现相同的查询。 这样的sql查询, SELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY + ' , ' + C_STATE as LOCATION FROM dbo.RECORDDETAILS 其中 CLIENTNAME (' newclient' ,' gdgf',' ibm',' pp' ) 现在创建过程''sp_cl ient'' 创建 procedure sp_client ( @ clientname ) as 开始 SELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY + ' ,' + C_STATE as LOCATION FROM dbo.RECORDDETAILS 其中 CLIENTNAME in ( @ clientname ) end 如何执行我的程序,我只有一个参数,但如何在单个参数中传递多个客户名称 请帮助我, 谢谢并问候解决方案 hi all,i am write the query in sql server working fine, but how to implement the same query using procedures.my sql query like this,SELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY+', '+C_STATE as LOCATION FROM dbo.RECORDDETAILS where CLIENTNAME in ('newclient','gdgf','ibm','pp')now am create the Procedure ''sp_client''create procedure sp_client(@clientname)asbeginSELECT RECORDID,AVAILABILITY,EMPLOYEMENTSTATUS,CLIENTNAME,DOB,SKILLS,EMAILID,VISA,CREATEDDATE,LOCATION,CITY+', '+C_STATE as LOCATION FROM dbo.RECORDDETAILS where CLIENTNAME in (@clientname)endhow to execute my procedure, i have only one parameter but how to pass multiple client names in single parameterplease help me,thanks and regards 解决方案 这篇关于如何在stroed过程中使用'in'原因编写查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-08 20:53