Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro Select query with joins to Sql Server tables?
Message
De
10/04/2013 15:52:24
 
 
À
10/04/2013 12:12:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01570621
Message ID:
01570664
Vues:
43
>>How do write a Select where you need to join a local (pre-existing) cursor with one or more tables from the Sql Server??
>>
>>In this example below from my current DBF-based app, lcCsrMtlRecords is a local cursor and I need join it to some lookup values that need to come from my Sql Server database (Jobs and Users).
>>
>>
>>Select Users.email ;
>>	From (lcCsrMtlRecords) ;
>>		Join Jobs On Jobs.job_num = &lcCsrMtlRecords..mat_code ;
>>		Join Users On Jobs.quoted_by = Users.emp_num ;
>>	Where qty_recd <> before_qty_recd ;
>>	Order By 1 ;
>>	Group By 1 ;
>>
>>
>>
>>
>>.
>I have always pulled the remote data down via SQLEXEC() and then joined the resulting local cursors.
>
>I have no idea if it will work but...................
>
>If you get your Sql Server data via a remote view could you then join the view with a local cursor????

That was my first thought - it would be elegant if it works and the performance is adequate.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform