>Hi Sergey,
>
>>>It's not clear from your post what 'query fails' means. Do you get an error, incorrect result, something else?
>
> The query executes but I get an incorrect result; when I say it fails, I mean it gives more than row for the same EmpPK. My intent was to request a cursor that has only 1 row for each unique EmpPK in the input data. Is this possible using DISTINCT?
>
>Thanks, Chaim
It's possible only if the rest of the fields included in the query have the same value per EmpPK.
--sb--