A cursor is still a table, it just goes away when you close it. By using a
named curor, you will need
to close it with the USE IN (SELECT("tmp")) method, before trying to
create another with the same name.
Rick Q
[email protected]
On Thu, Jun 17, 2010 at 11:30 PM, Sytze de Boer <[email protected]>wrote:
> I think my previous post was not clear
> My statement, "It is not possible to "select into cursor tmp" twice on
> the same workstation" was meant to indicate that within the program,
> on the same pc, you could not end up with a select into cursor tmp
>
> So, how come I can end up with the error "Alias name is already in use"
> It isn't even an alias, its a cursor
>
> S
>
>
>
>
>
> On Fri, Jun 18, 2010 at 2:34 PM, Rick Schummer
> <[email protected]> wrote:
> >>>It is not possible to "select into cursor tmp" twice on the same
> > workstation<<
> >
> > Correct, you have to either close the cursor to reselect into the same
> > alias, or you have to pick a different alias.
> >
> > USE IN (SELECT("tmp"))
> >
> > lookprev=client
> >
> > SELECT client,date,sum(ttlamount-disc+gst) as sumttl, invnum FROM winhst
> > WHERE client=lookprev AND trantype='I' GROUP BY invnum ORDER BY date INTO
> > CURSOR tmp
> >
> > Rick
> > White Light Computing, Inc.
> >
> > www.whitelightcomputing.com
> > www.swfox.net
> > www.rickschummer.com
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]]
> On
> > Behalf Of Sytze de Boer
> > Sent: Thursday, June 17, 2010 09:10 PM
> > To: [email protected]
> > Subject: VFP9 - error
> >
> > Can anyone help me why the following code can return an error, and/or
> what I
> > should do to avoid it
> > It is not possible to "select into cursor tmp" twice on the same
> workstation
> >
> > lookprev=client
> > SELECT client,date,sum(ttlamount-disc+gst) as sumttl, invnum FROM winhst
> > WHERE client=lookprev AND trantype='I' GROUP BY invnum ORDER BY date INTO
> > CURSOR tmp
> >
> > The error is "Alias name is already in use"
> >
> >
> > --
> > Regards
> > Sytze de Boer
> > Kiss Systems
> > Hamilton, NZ
> > Ph: 64-7-8391670, Mob:64 21 937611
> > URL: www.kiss.co.nz
> >
> >
> > --- StripMime Report -- processed MIME parts ---
> > multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.