March 31, 2005 at 5:56 pm
Hi All,
I need your help with joins. I have a table which contains the store number and day polled in the week. for example
storeNo DayPolled
------------------------
30 22-mar-2005
30 23-mar-2005
30 24-mar-2005
30 25-mar-2005
30 26-mar-2005
30 27-mar-2005
30 28-mar-2005
....
....
so for each store there will be seven days in that week saying the store is opened on those 7 days. for some stores the store might not be opened seven days. I want to find those stores which are not opened 7 days and the day it is not opened. How could I do that?
Thanks,
Sridhar.
March 31, 2005 at 6:05 pm
Select StoreNo
From MyTable
Where DayPolled between '22-Mar-2005' and '28-Mar-2005'
group by StoreNo
Having Count(*) < 7
Edit: Sorry I just noticed this answers only part of your question.
March 31, 2005 at 6:07 pm
i found the solution
Thanks,
Sridhar.
March 31, 2005 at 6:08 pm
Don't keep it secret - what was the solution.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply