clear all close all release all private pDate pDate={'02/11/2004 12:00:00 AM'} SET ENGINEBEHAVIOR 70 lcSql = [select acct_bal.*, cases.pk as cases_pk, ] +; [trustee_no.pk as trustee_no_pk, trustee_no.tid as trustee_no_tid ] +; [from Acct_Bal ] +; [left join cases on cases.case_no = acct_bal.case_no ] +; [left join trustee_no on trustee_no.tid = acct_bal.tid ] +; [where acct_bal.bal_date = ?pDate ] +; [having ISNULL(cases_pk) ] && This syntax only for VFP ODBC ch=sqlstringconnect(tcConnectionString) =sqlexec(ch,lcSql,'curTest') ?RECCOUNT('curTest') && Always the same number of records (112,349) =SQLDISCONNECT(ch) select * from curTest into cursor curTest2 group by tid, case_no into cursor curTest2 ?RECCOUNT('curTest2') && DIFFERENT EACH RUN!!!! (19,115 to 20,449 range on 40 runs)Side question: I originally had the having ISNUll(cases_pk) as part of the where (where ... and cases_pk is null) which VFP liked natively (and SQL ODBC), but does not like this syntax going thru ODBC to VFP. Why is the VFP syntax requirements different when going thru ODBC then when running natively?