Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Kirk,
Have you tried the UNION command? You build two sql statements and put them together with a UNION command. It essentially will pull data from two unrelated tables into one query.
SELECT PCODE,PADR( PDESC,35 ) AS PDESC FROM Table1 UNION ALL SELECT PCODE,PADR( PALIAS,35 ) AS PDESC FROM Table2
Some issues to keep in mind: The two SELECT commands must have the same number of fields, the same data type and the same names. Also, I noticed one of the fields was C(35) and the other was smaller. You will want to force the smaller field to the larger size with a PADR command.
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