formula with "sql-select-in" error

Posted by Rollbase User on 16-Aug-2013 07:38

I have this formula: var arr = rbv_api.getRelatedIds("R71882899", {!id}); rbv_api.print("arr.join(): "+arr.join()); return rbv_api.selectNumber("select count(1) from settlement_in_line where lu_settlement_in in ( ? )", arr.join()); The print above give me this result: 76173591,76173592,76173593,76173594,76173595,76173596,76173597,76173598 But the returning value is 81 (Wrong) When I try to test this query like this: select count(1) from settlement_in_line where lu_settlement_in in (76173591,76173592,76173593,76173594,76173595,76173596,76173597,76173598) ...I got the correct answer: 405. Can anyone tell me why?

All Replies

Posted by Admin on 17-Aug-2013 09:32

Hi Stein,



How are you testing the query in your second example? It seems like more than a coincidence that 405 = 81 * 5... Is it possible there is security / permissions layer applying to the first query that is reducing the number of results returned?

This thread is closed