So What I mean is I need to get data from cache which has keys in the list I
pass to query.
equavalent SQL will be like, 
List list = Arrays.asList(2,3,6);//dynamic list coming from client
                        StringBuffer queryStrings = new StringBuffer(" ");
                        for (Object object : list) {
                                queryStrings.append("?,");
                        }
                        queryStrings.deleteCharAt(queryStrings.length()-1);

                        String sql = "select * from Company where Id in (?);
                        SqlQuery<Integer, Company> query1 =  new 
SqlQuery<>(Company.class, sql);
                        query1.setArgs(queryStrings.toString());

Here, I can append as many keys to stringbuffer as I want and then pass them
to IN clause. BUt this is not good approach and plus IN will not use
indexing.

How do I achieve same thing using table JOIN approach you suggested.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Getting-exception-in-SQL-Query-JOINS-tp6674p6732.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to