Oracle Database 10g Enterprise Edition Release 10.2.0.5.0
Is the following SQL syntax correct ?
Select FieldA, FieldB, FieldC, FieldD, FieldD From ViewA
where FieldD in (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20);
The SQL runs correctly sometime and other times not. When all the Bind variable are defined and are NOT null it always runs. If some of the bind variables are not define or NULL it runs correctly sometimes and others not. It just goes into a run in Oracle and never returns.
Is there a better way to write the SQL so that BIND variables can be NULL.