Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec() SQL Select from 2 DB
Message
 
 
À
15/09/2017 13:04:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01654292
Message ID:
01654369
Vues:
40
>>>>Thank you. I may break the query just to be sure that the user has access to the second database. Also, I don't like to use the DB name in the query (it would be hard-coding it). I prefer to use a handle.
>>>
>>>Then you have two SQL statements, one per handle, get two cursors and then join them in VFP.
>>>
>>>Not what you wanted to hear, but so it is.
>>
>>Actually this is an approach I was considering. But I am not sure that this is a good approach since one of the SQL Selects could be a long string. It uses the syntax "where xyx in (....)." So the string in the parenthesis would be created in once query and then used in the other. And depending on how many items are in this expression, it could be long.
>>Borislav mentioned synonym and if it works (and I don't have to hard-code the name of the database into the query), this could be doable.
>
>If join is inner, execute on server by all means.
>Left and right join sometimes in perf similar, client probably faster in joining if internet is slow.

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform