How to modify a schema.xml of an existing list?

SQL question, joins and subqueries?

  • 3. For each order, display the OrderID, ShipName, and the Employee First and Last Name. Order the results by Employee Last Name in descending order, then by Employee First Name in ascending Order, then by OrderID in ascending order. 830 rows returned. SELECT a.orderID,a.ShipName,b.Firstname,b.Lastn… FROM Orders AS a inner join Employees AS B ON a.EmployeeID=b.EmployeeID ORDER BY lastname DESC,FirstName ASC, OrderID ASC 4. Modify the first query to list the orders with customer details, but include all customers even if they have not placed an order. I looked at the actual customer details tab and it showed no null values from customers not placing an order, am I missing something? It just shows the same number that I get by doing the first query but it is supposed to add two to it, but I do not see the two in the table that it could pull up. I did select * from orders to see what was there, and the null value ones do not come up as existing. I know I have to be missing something but not sure what. Thanks for the help guys.

  • Answer:

    Inner joins do not show nulls. With an inner join the matched columns must match each other or that record is left out. An outer join will bring everything including nulls. If what column your matching on doesn't match it includes that row anyway.

tedead at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

This SQL tutorial may help you to learn Joining tables and sub queries:

Sovandara

hi Heather... learn outer joins please (left join, right join). the answer is there :) here's the link which i found via google : http://www.w3schools.com/sql/sql_join_left.asp

nicefx

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.