I am trying to find all users who had transactions on three different dates and I don't want to wade through a compilation of the transactions of those dates.
The only way I know how to do it is with intersect:
I would like to know if there is something similar to the in operator, so that I can write the SQL stmt like the following:
The in operator will give me a list of users who had transactions on any of those three dates, but I only want the ones that had transactions on all three dates.
Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan
The only way I know how to do it is with intersect:
Code:
select * from transactions where transaction date = date1
intersect
select * from transactions where transaction date = date2
intersect
select * from transactions where transaction date = date3
Code:
select * from transactions where transaction date [i]operator name[/i] (date1, date2, date3)
The in operator will give me a list of users who had transactions on any of those three dates, but I only want the ones that had transactions on all three dates.
Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan