
January 22nd, 2013, 04:34 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 1
Time spent in forums: 4 m 28 sec
Reputation Power: 0
|
|
|
Possible solution
Quote: | Originally Posted by shaunswales Hello,
The tables and fields needing to be used in the query are:
Table: CatReq
Fields: Email, EntryDate
Table: TblCustomerAccounts
Fields: Email, AccountID
Table: TblOrders
Fields: 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.
Thanks
Shaun Swales |
SQL >
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.
|