Surprisingly enough <g> Sergey is right about the parameter length required by INLIST() and SQL IN() statements. My work-around would be
SELECT Regno FROM Test GROUP BY Regno ;
WHERE Regno NOT IN (12,41,50,51,52,53,54,55,56,57,58,59,60,61,62,63);
AND Regno NOT IN (64,65,66,67,68,69,7012,59,60,61,62,63,64,65,66,67)
This may not be "best" but it will require no modification to the rest of your code and is probably not significantly slower than alternate solutions.
I also tend to think that SELECT DISTINCT regno is faster than GROUP BY, but I'm not 100% on that.
>Hi All,
> I am using the simple select statement and getting the following error:
>
>Error is SQL expression is to complex
>
>my select is
>
>SELECT Regno from Test group by Regno order by Regno ;
>Where Regno not in(12,41,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,7012,59,60,61,62,63,64,65,66,67)
>
>Any Ideas?
>
>Thanks