2

I would like to pass an SQL ARRAY to Native query as Parameter.

I was able to pass SQL Array to Stored Procedure successfully.

But I can't get the same thing to work with normal native SELECT statement.

I am using JPA 2.5, Eclipse Link, Oracle DB.

I want to go for this approach as

  1. SQL Statement has limit of 1000 parameters for IN clause.
  2. JPA Native Query does not support passing LIST as a parameter to NamedNativeQuery.
  3. Using SQL Array it can be directly written in a query as:

    select * from order
    where customer_id in
             (select column_value from TABLE ( ?param_arr_customer_ids ) )
    
Toby Speight
  • 27,591
  • 48
  • 66
  • 103
  • 1
    Please [edit] your question to show [what you have tried so far](http://whathaveyoutried.com). You should include at least an outline (but preferably a [mcve]) of the code that you are having problems with, then we can try to help with the specific problem. You should also read [ask]. – Toby Speight Mar 03 '17 at 13:12
  • Updated the main question – Abhijeet Rathod Mar 09 '17 at 06:48

0 Answers0