January 22nd, 2013, 05:34 AM
Join Date: Jan 2013
Time spent in forums: 4 m 28 sec
Reputation Power: 0
Originally Posted by shaunswales
The tables and fields needing to be used in the query are:
Fields: Email, EntryDate
Fields: Email, AccountID
What I Need:
The query needs to display people who are located 'CatReq' table who's 'EntryDate' is after after '01/12/2012 00:00:00', and haven't placed and order will be displayed. This will be checked by the Email field being checked against the 'TblCustomersAccounts' to get the 'AccountID' and then this checked to see if the 'AccountID' is within the order table.
I look forward to hearing a solution as it has royally got me stumped.
select a.Accountid from
(Select Accountid From Tblcustomeraccounts A,Catreq B
Where A.Email = B.Email And Entrydate > Date '2012-01-12') A, Tblorders B
Where A.Accountid=B.Accountid (+)
and b.Accountid is null
Hope this will help to you.