Senin, 19 Desember 2016

Re: [MS_AccessPros] SQLFMM example: SQL not matching Design Grid in Access

 

Jo-


Which edition of the book are you working from?  In the latest edition, the problem statement is:

 5. "Show me customers and employees who have the same last name."
(Hint: The solution requires a JOIN on matching values.)
You can find the solution in CH08_Customers_Employees_Same_LastName
(16 rows).

The SQL for the query is:

SELECT (Customers.CustFirstName & ' ' & Customers.CustLastName) AS CustFullName, (Employees.EmpFirstName & ' ' & Employees.EmpLastName) AS EmpFullName
FROM Customers INNER JOIN Employees ON Customers.CustLastName=Employees.EmpLastName;

.. which matches what you have in your message.

The output is:

CustFullName
EmpFullName
Rachel Patterson
Ann Patterson
Luke Patterson
Ann Patterson
Maria Patterson
Ann Patterson
Neil Patterson
Ann Patterson
William Thompson
Mary Thompson
Suzanne Viescas
Carol Viescas
John Viescas
Carol Viescas
Caleb Viescas
Carol Viescas
Kirk DeGrasse
Kirk DeGrasse
Suzanne Viescas
David Viescas
John Viescas
David Viescas
Caleb Viescas
David Viescas
Rachel Patterson
Kathryn Patterson
Luke Patterson
Kathryn Patterson
Maria Patterson
Kathryn Patterson
Neil Patterson
Kathryn Patterson

16 rows.  What are you seeing different?


John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Dec 19, 2016, at 1:46 AM, jovaughn@rochester.rr.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I am working thru SQLFMM. In CH08 example the SQL output does not match what shows up and is required 

in the Design Grid. Is this a well known feature/bug?


SELECT (Customers.CustFirstName & ' ' & Customers.CustLastName) AS CustFullName, 
            (Employees.EmpFirstName & ' ' & Employees.EmpLastName) AS EmpFullName
FROM Customers INNER JOIN Employees 

            ON Customers.CustLastName = Employees.EmpLastName;





__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar