HELP: Queries and subqueries

V

VB Programmer

I was continually getting an error in Access about "ambiguous outer joins."
It recommends to "create a separate query that performs the first join and
then include that query in your SQL statement."

How do I create the same query in ADO.NET? Not sure if I can create a
separate subquery, etc...

Should I simply call the Access query? Is there another way???

FYI:
Here are the table links:
Employees (1 to many) DailyStatusSessions
Stores (1 to many) DailyStatusSessions

I want the first link to be a LEFT JOIN, but this is where I encounter the
"ambiguous out joins" error.

Here is the SQL Statement:
SELECT DISTINCT [Employees].[FirstName] & ' ' & [Employees].[LastName] AS
DisplayName
FROM Stores INNER JOIN (Employees LEFT JOIN DailyStatusSessions ON
Employees.EmployeeId = DailyStatusSessions.EmployeeId) ON Stores.StoreId =
DailyStatusSessions.StoreId;
 
W

William \(Bill\) Vaughn

ADO has no query engine. It (like Access) calls on the JET database engine
to do all the queries. While Access did provide some expression/function
enhancements, what you're doing should not pose any problems for ADO. Simply
pass this query to ADO in a CommandText string.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top