Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement