Pass two or more value [message #662732] |
Wed, 10 May 2017 21:58 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/3b95a8e695c1bfa19075996c0f098339?s=64&d=mm&r=g) |
jen888
Messages: 2 Registered: May 2017
|
Junior Member |
|
|
In SSRS (Microsoft Visual Studio) I have a parameter pass policyno. The policyno may be one or two, I use split function to separate two policyno. Like: split(Parameters!policyNumber.Value,","). The where clause in my Oracle stored procedure as
Where policyno in (v_policyno) but it returns no data with two policyno, it works fine with one policyno. How can I correct it?
Thanks!
|
|
|
Re: Pass two or more value [message #662733 is a reply to message #662732] |
Thu, 11 May 2017 00:10 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21811 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If maximum number of parameters is 2, perhaps the simplest option is to use two parameters in Oracle's WHERE clause, such as:
where policyno = par_policyno_1
and (policyno = par_policyno_2 or par_policyno_2 is null)
Otherwise, search for "varying elements in IN list" (you'll find references on OraFAQ forum, as well as the Internet).
[Updated on: Thu, 11 May 2017 00:10] Report message to a moderator
|
|
|
|
|