Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting most recent orders?
Message
 
 
To
11/09/2008 14:21:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01249462
Message ID:
01346759
Views:
6
Use Orders.OrderDate IS NULL to make it SQL Server compatible :)

>
SELECT Customer.CustomerID, Customer.CustName, Orders.OrderID, ;
>			Orders.OrderDate, Orders.Destination ;
>	FROM Customer ;
>		LEFT OUTER JOIN orders ON Orders.CustomerID = Customer.CustomerID ;
>	WHERE ISNULL(OrderDate) OR OrderDate = ( SELECT MAX(OrderDate) FROM Orders Recent WHERE Recent.CustomerID = Orders.CustomerID) 
>
>
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform