Tracy Pearson wrote: > You're creating a new cursor, not selecting into a cursor there. Apples and > oranges in my opinion.
Solved it---if it's a CURSOR, then it doesn't error, but if it's a TABLE, then it fails. Here was my test code: LOCAL liLoop as Integer, nID as Number, dNewStop as Date CLOSE DATABASES ALL CREATE TABLE TempSes (foo c(3), bar i) && if this is a CURSOR, no error occurs, but it errors if it's a TABLE DBF INSERT INTO TempSes VALUES ('TEST',123) USE c:\symplcty\sym_data\erl_sub IN 0 SHARED USE c:\symplcty\sym_data\seats IN 0 SHARED USE c:\symplcty\sym_data\sessions IN 0 SHARED USE c:\symplcty\sym_data\sessionx IN 0 SHARED SELECT erl_sub SCAN nID = erl_sub.idnum WAIT WINDOW "Processing " + ALLTRIM(STR(nID,15,5)) NOWAIT dNewStop = GOMONTH(DATE(),24) USE IN (SELECT("TempSes")) && using this removes the error, regardless of whether created as CURSOR or TABLE sele a.pmf, a.mu_date, b.date, b.time,; b.sesid, .F. as SesXRec, a.attmark; from seats a, sessions b; where a.sesid = b.sesid; and a.erlsubid = nID; and b.date > dNewStop; union select c.pmf, c.mu_date, b.date, b.time,; b.sesid, .T. as SesXRec, 0 as attmark; from sessionx c, sessions b; where c.sesid = b.sesid; and c.erlsubid = nID; and b.date > dNewStop; into cursor TempSes ENDSCAN I'll probably change to 2-letter aliases also. Thanks for your thoughts, guys. Good pointer, Al! -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/4ba0f189.3020...@mbsoftwaresolutions.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.