Hello,
I'm trying to run a query that will get ALL of the customers out of the CUSTOMER table and also to display each order IF the order is greater than a certain date.
I tried a LEFT join but it still requires the customer to have an order of some kind, because of the date restriction in the ORDERS table.
I know I can use a subquery to obtain this information, becuase that's what I'm using now. However, I'm getting a feeling that the subquery is slowing down the performance of the query. Also, it's alot of extra code to write instead of the LEFT join.
When you think about it, there should be a way to return this information with a LEFT join. All I'm asking is to return all customers no matter what, plus any order that is past a certain order date.
I'm hoping there is a way to tell the query to support the LEFT join command AND the restrictions in the WHERE clause as well.
Is this possible?
Thanks,
Peter![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
I'm trying to run a query that will get ALL of the customers out of the CUSTOMER table and also to display each order IF the order is greater than a certain date.
I tried a LEFT join but it still requires the customer to have an order of some kind, because of the date restriction in the ORDERS table.
I know I can use a subquery to obtain this information, becuase that's what I'm using now. However, I'm getting a feeling that the subquery is slowing down the performance of the query. Also, it's alot of extra code to write instead of the LEFT join.
When you think about it, there should be a way to return this information with a LEFT join. All I'm asking is to return all customers no matter what, plus any order that is past a certain order date.
I'm hoping there is a way to tell the query to support the LEFT join command AND the restrictions in the WHERE clause as well.
Is this possible?
Thanks,
Peter
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)