SQL Server SQL to Access 2003

G

Geossl

The following query is for SQL Server. How to convert this to Access 2003 SQL?

SELECT Organization.Name, Organization.Id AS OrganizationID,
Item.Id as Itemid, Item.CTitle, Item.Title,
AcceptList.*
FROM Organization
CROSS JOIN Item
LEFT JOIN (
SELECT S.OrganizationID, en.ItemID
FROM Event S, Program en
WHERE en.EventID = s.Id
AND en.Accepted = 1
GROUP BY S.OrganizationID, en.ItemID
) AcceptList ON AcceptList.OrganizationID = Organization.Id
and AcceptList.ItemID = Item.Id
where AcceptList.ItemID is null
 
S

Stefan Hoffmann

hi,
The following query is for SQL Server. How to convert this to Access 2003 SQL?

SELECT Organization.Name, Organization.Id AS OrganizationID,
Item.Id as Itemid, Item.CTitle, Item.Title,
AcceptList.*
FROM Organization
CROSS JOIN Item
LEFT JOIN (
SELECT S.OrganizationID, en.ItemID
FROM Event S, Program en
WHERE en.EventID = s.Id
AND en.Accepted = 1
GROUP BY S.OrganizationID, en.ItemID
) AcceptList ON AcceptList.OrganizationID = Organization.Id
and AcceptList.ItemID = Item.Id
where AcceptList.ItemID is null
The cross join is the simple: .. FROM Organization, Item...


mfG
--> stefan <--
 
S

Stefan Hoffmann

hi,
But the whole thing does not work...
Sorry, I thought it was obvious that you need another sub select, e.g.

SELECT *
FROM
(
SELECT T1.Id AS T1ID,
T2.ID AS T2ID
FROM Table1 T1, Table2 T2
) Q
LEFT JOIN (
SELECT *
FROM Table3 T3
) AL ON AL.ID = Q.T1Id AND AL.ID = Q.T2Id



mfG
--> stefan <--
 

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