|
[
Permalink
| « Hide
]
Vlad Khorsun added a comment - 02/Aug/10 09:43 PM
Reproducible test case required
Confirmed.
Note, NOT EXISTS works correctly despite of usage of parameter\literal. Probably it is related with optimization of NOT IN handling. I'm trying:
execute block returns (fcuenta integer, fnombre varchar(10)) as declare gro integer = 100; begin for SELECT FCUENTA, FNOMBRE FROM CON_CUEN WHERE FCUENTA NOT IN (SELECT FCUENTA FROM SP_TEST(:gro)) into fcuenta, fnombre do begin suspend; end end! And it returns no rows, like passing 100 directly. AFAIK, in most cases this should work as passing the parameter from the client. I've no tool to do that now. What is the incorrect result? Adriano,
SELECT with parameter returns 474 rows, as if it have no WHERE clause. I.e. SELECT FCUENTA, FNOMBRE FROM CON_CUEN WHERE FCUENTA NOT IN (SELECT FCUENTA FROM SP_TEST(:GROUP)) and SELECT FCUENTA, FNOMBRE FROM CON_CUEN returns the same number of rows (474) Also, both queries reads only CON_CUEN table, i.e. first query never call procedure SP_TEST |
|||||||||||||||||||||||||||||||||||||||||||||||||||||