>>For this select you don't need SELECT IN clause at all. Just add your WHERE condition to the Select statement.
>>
>I don't think so. I need all the records for any RMA which has a record of "Passed - waiting for source". Removing the IN clause would throw away those other records
>
>>>SELECT * FROM (lcReturn) ;
>>> WHERE rma_no IN (SELECT rma_no FROM (lcReturn);
>>> WHERE activity = "Passed - waiting for source" ;
>>> AND EMPTY(date_end)) ;
>>> INTO CURSOR (lcReturn)
is the same as
SELECT * FROM (lcReturn) ;
WHERE activity = "Passed - waiting for source" ;
AND EMPTY(date_end)) ;
INTO CURSOR (lcReturn)
If it's not broken, fix it until it is.
My Blog