Hi Steve,
If agency is not in observe table than it doesn't have ANY info there.
>Sergey,
>
>You are right, if Agency is not in the Observe table, then there is no reason to check Activity. Ooooops! I removed the observe.activity field comparison, but I still want to compare only to Observe records that fall within the specified date range in the Observe table.
>
>So the new command would look like this. I doubt this command will do the date range comparison correctly because I don't SELECT the date fields FROM observe or would it? If not, what should I change?
>
>SELECT DISTINCT agency.agency FROM agency WHERE agency.agency ;
> NOT IN (SELECT observe.agency FROM observe) AND ;
> observe.date>=CTOD(sdate) AND observe.date<=CTOD(edate) INTO CURSOR agcy
>
>
>Thanks for the help.
--sb--