Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open several cursor at once

Status
Not open for further replies.

lustingray

Programmer
Oct 21, 2007
4
ES
Hi,

Can I create an open several Cursor at once?

I will give an example:

Select * from test ;
join newtable on test.news = newtable.names into cursor XKPRO


Select * from test2 ;
join newtable on test2.news = newtable.names into cursor PGNST


Select * from test3 ;
join newtable on test3.news = newtable.names into cursor BHLJF


Now...



SELECT * FROM XKPRO;
INNER JOIN PGNST ON PGNST.ctry = XKPRO.names;
INNER JOIN BHLJF ON BHLJF.ctry like XKPRO.names;
INTO cursor MEGAFUS


Regards

Lu Stingray
 
Why you need cursors for that?

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
Microsoft MVP VFP
 
Lu,

The answer is Yes. You can create many cursors at the same time. The code you showed is perfectly possible.

In this case, it would also be possible to do the whole thing with a single SELECT, without the intermediate cursors. But by all means do it the way you have, if you prefer.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I just find the way more fast. I think be working with cursors, but according with yours it is not sure?

Thank you in advance

Lu Stingray
 
What version you use?

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
Microsoft MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top