Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select * from 2 tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select * from 2 tables
Divers
Thread ID:
00307304
Message ID:
00307304
Vues:
50
Hi all

I am trying to create a cursor with the content of two tables, the first table contains 425 record, the second one 245. When i issue the following SQL statement : SELECT * from Table1 a, Table 2 INTO CURSOR MyCyrsor i get 104125 records (425*245) !!!

The two tables have the same structure. My workaroud is to create a Temporary table add append from the two tables:

USE Table1
MyCode = 1234
TempTable = SYS(2023)+'\'+SYS(2015)
COPY STRU TO (TempTable)
USE (TempTable) Alias Temp
Append From Table1 For Code = MyCode
Append From Table1 For Code = MyCode

There must be an SQL Statement who can do this ?

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform