Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FoxPro Select query with joins to Sql Server tables?
Message
 
 
To
10/04/2013 12:33:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01570621
Message ID:
01570633
Views:
51
>>Get your Jobs and Users into local cursors and then join with them locally.
>
>The Sql Server table 'Jobs' has 43,000 rows in it and I need to join them with a local cursor that has about 8 rows in it to find the 8 matching records in 'Jobs' based on a lookup field.
>
>So, are you telling me I habe write one Sql Server query to pull over all 43,000 rows to a local cursor, then write a FoxPro select to join them to the other existing local cursor?
>
>Yikes!!! That's ugly.
>
>
The alternative way is to pass local cursor to the SQL Server, e.g. something like this
text to lcInsert noshow
declare @LocalTable (field1 varchar(10), field2 int)
endtext

select local cursor
scan

using textmerge create insert statements for the local cursor
endscan
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform