Here's the code:

nID = erl_sub.idnum
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


Often users are getting "Error 24 - Alias name is already in use."  How 
can that be?  If cursor TempSes existed already, wouldn't it just be 
overwritten?  If this perhaps due to some other area of code having a 
temporary DBF open called TempSes?

My fix will be to just put a USE IN (SELE("TempSes")) ahead of it, but I 
was curious as to why this sql would fail with this error.  (It's legacy 
code from many moons ago, and the error doesn't always happen.)

tia,
--Mike


-- 
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/4ba00b36.4050...@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.

Reply via email to