Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLExec() SQL Select from 2 DB
Message
From
15/09/2017 13:04:08
 
 
To
14/09/2017 14:12:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01654292
Message ID:
01654368
Views:
55
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform