469,129 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,129 developers. It's quick & easy.

Problem with IN statement in Stored Procedure

I have a asp.net web page that uses a Crystal report. The report gets its data from a stored procedure that has three parameters @Startdate,@enddate and @teams. The page passes @Teams with multi values to a stored procedure using a IN statement. Here is the stored Procedure:
Select sum(Value1)as Value1_count
, sum(Value2) as Value2_count
, sum(Value3) as Value3_count

FROM Table1
WHERE Act_date between @startdate and @enddate and Team in('+ @Teams+')
Passing one value works but two or more doesn't.
The parameter value is passed like:
Teams.Value = "Value1,Value2"
Nov 3 '06 #1
0 1299

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Jason Callas | last post: by
2 posts views Thread by Kent Lewandowski | last post: by
5 posts views Thread by Timppa | last post: by
8 posts views Thread by dthmtlgod | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.