日期:2014-05-17  浏览次数:20426 次

SQL存储过程In 参数 GUID类型的字符串
我编写了一个存储过程 其中有一个条件是需要ID IN(参数)
这个参数我传递进来的时候是一个
这样的字符串 其中每一个,隔开的ID是GUID类型的

这个时候就有问题了。
exec p_ri_GetAboutSalaryInfo '2014-1-1 0:00:00' ,'0968aebd-8b8c-4542-9694-82be41b98ac3,8e77a0f1-eef9-4b4d-a53b-ec70f7be2e55,3f7ec143-953b-4917-860d-783a1b69d75a,f1f375e1-411e-43d0-96a4-93fa183e13f6,1a3216f6-81e3-48ac-a1d4-4bc994abfd05,66eabd0e-4c2e-4f66-9808-10e8b71b55f1,4df7249c-d925-4acf-88aa-f868ab6acf0d,ed140d80-48b0-4906-8437-369058005d17,efe5bf8e-88ec-49de-baee-42c94fbe9df4,a131b271-ad59-41ec-81d3-eb49cd0106f0,ade786ac-ce10-465f-acfc-d52c22f38abd,4391c532-c2aa-4e3a-a02b-00a178db7b1b,fc61efc2-ca00-4c80-a49a-4567e664e9de,04624229-0e72-4f80-888e-5a625f03c751,aecc677d-190f-4c5b-b54c-ac41698ddd1d,4417dc19-ceb7-461f-950b-0408cfa7c1c5,e46f0bbb-f3ac-414e-8b3b-1b495a1c72d1,60550afc-2dc9-4d51-bf1b-328ef7b383f1,5cb0e3d4-1ca5-49a4-b9d1-6a6ab23e65ae,5ac275fb-4867-4557-92fc-07ca23b2e0e8,eff9ee49-04e7-49d1-b81a-fa4edd6a9fba,795b3090-5207-4ecd-aed8-c781b78e0bac,37e76fda-2383-41e0-8e4c-c99efb06ced0,151cc587-fea0-41db-bf9d-d315dcadfbea,85266233-bca7-460a-9e33-59f027753e60,eb97ddd4-9254-4aa4-90d3-3903bc141f52,bdd2e0a4-a910-42bd-a5dc-f3952d15d303,9f88625c-fd07-4782-9506-c1b8b0c64f8e,f63c649d-ca72-49e2-9d60-db9a3915c401,e236cb46-a98f-408a-8a08-167530aeec6f,b15a4890-92e2-4d7d-a5f9-2ea180eab24c,8f0a1a7a-9e0d-414e-b71c-b3458f33e366,ed60c57c-bc2f-4a88-9b38-21cb9ac0a38d,0ceb0655-f246-41cf-bfe6-8a9396ef123e,6969d366-fc5b-4f27-95a0-0f7fbbfddca9,77ab11fa-214b-4a1e-9980-82a9c0052847,6202b12f-539c-44a7-9bba-edfb04a054dd,46d0fceb-2a70-4b81-9c2c-aec36411d850' 

你们一般怎么处理的?


------解决方案--------------------
Refer this:
http://www.cnblogs.com/insus/articles/1918003.html