Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting most recent orders?
Message
De
11/09/2008 14:10:10
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01249462
Message ID:
01346736
Vues:
8
>
>SELECT Customer.CustomerID, Customer.CustName, Orders.OrderID, ;
>			Orders.OrderDate, Orders.Destination ;
>	FROM Customer ;
>		LEFT OUTER JOIN orders ON Orders.CustomerID = Customer.CustomerID ;
>	WHERE OrderDate = ( SELECT MAX(OrderDate) FROM Orders Recent WHERE Recent.CustomerID = Orders.CustomerID) 
>
Now I've got a new twist on this - I need to include ALL customers, even those without an order. The above SQL filters those out. I've been beating my head against it without success. Any ideas?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform