Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join 2 simulair databases in SQL select
Message
From
03/04/2000 17:53:41
 
 
To
03/04/2000 17:28:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00354627
Message ID:
00354657
Views:
11
>Hello,
>
>I have the following question:
>
>Is it possible to link 2 or more free tables with Sql-select ?
>
>The tables i use are ordlines.dbf and ordlines_history.dbf the fieldnames are identical and the records are all unique. I want to have them into 1 new cursor called ordlines_total.
>
>Can this be done without using a r/w cursor with append from ....
>
>Thanks in advance

You could look into the UNION clause of SELECT - SQL. However, Unions tend to be amongst the slowest SELECT - SQL operations, especially with large tables.

If you're looking to do computations on columns you could do also look into the SUM() and COUNT() operators for SELECT - SQL.

Or, it may be simpler and run faster to use CALCULATE SUM ... etc. on the tables separately, then add up the values afterwards.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform