Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use LEFT JOIN
Message
 
À
16/03/2002 13:13:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00633770
Message ID:
00633829
Vues:
16
Aritra,

My other response showed you how to use the ANSI JOIN syntax to get the left outer join, if you want to do it with the WHERE clause you can do it this way.
SET DELETED ON
SELECT emp.emp_id, emp.emp_name, emp.emp_address, sec.emp_section ;
  FROM empl emp,  empsec sec ;
 WHERE emp.emp_id == sec.emp_id ;
 UNION ALL ;
SELECT emp.emp_id, emp.emp_name, emp.emp_address, SPACE(XX) ;
  FROM Empl emp ;
 WHERE emp.empID NOT IN(SELECT EmpID FROM Empsec) ;
INTO CURSOR temp
SPACE(XX) is a placeholder for the sec.e,p_section field, make the XX rthe number of spaces for the length of the emp_section field.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform