I thought I had this all figured out when using NOT EXIST on a SQL SELECT. But I think not... I left the following code running on my workstation when I left last night. I came in this morning to find "Not Enough Disk Space for Temp File" error message from first query. My tables are huge so this error is common for me. So I re-ran the same code on my database server (a killer NT4 machine where tables are stored) And for 3 minutes the query progressed slowly, it reached 32% and then just sat there. It is still just sitting there after 30 minutes. What did I do wrong this time?
SELE addunit.account, azactive.name FROM addunit, azactive ;
WHERE NOT EXISTS( ;
SELE * FROM addunit WHERE addunit.account==azactive.acct) ;
INTO CURSOR temp1
SELE azhandle.account, azactive.name FROM azhandle, azactive ;
WHERE NOT EXISTS( ;
SELE * FROM azhandle WHERE azhandle.account==azactive.acct) ;
INTO CURSOR temp2
SELE * FROM TEMP1 ;
UNION ;
SELE * FROM TEMP2 ;
INTO TABLE AZTERMS
Notes: Using 2.6 tables in VFP 5.0a, addunit has approx. 46,000 records, azactive has approx. 193,000 records, azhandle has approx 454,000 records, index tags in place for addunit.account and azhandle.account
Roxanne M. Seibert
Independent Consultant, VFP MCP
Code Monkey Like Fritos