Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INNER Join or Outer Join??
Message
 
 
À
26/07/2006 09:06:48
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01140133
Message ID:
01140136
Vues:
16
This message has been marked as the solution to the initial question of the thread.
You need UNION not JOIN
SELECT dateField FROM table1 ;
UNION ;
SELECT dateField FROM table2 ;
>I have 2 tables.
>
>Table1
>
>2006-01-01
>2006-01-01
>2006-01-01
>2006-02-01
>2006-02-01
>2006-02-01
>2006-02-01
>2006-03-01
>2006-03-01
>
>
>Table2
>
>2006-01-01
>2006-01-01
>2006-02-01
>2006-03-01
>2006-03-01
>2006-04-01
>
>
>I want to use join statement in SQL select to Output like this:
>Output table
>
>2006-01-01
>2006-02-01
>2006-03-01
>2006-04-01
>
>
>I have tried to use INNER JOIN & OUTER JOIN & LEFT JOIN, none are working... Any idea?!
>
>SELECT distinct a.tx_date FROM tx1 a inner JOIN (select DISTINCT b.tx_date FROM tx2) b ON a.tx_date = b.tx_date INTO cursor tmp
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform