Hi,
I am trying to get a distinct count.
My data looks like this...
StudentId ; BookItem ; BookStoreNum ; BookDate
11564;1;342680;12/15/2001
11564;21;342680;12/15/2001
11564;21;342680;12/22/2001
12244;1;342680;1/11/2001
12244;1;342680;2/24/2001
I want a DISTINCT COUNT
Select Count(BookDate) as Books
FROM RecordsData
Where StudentId = '11564'
And BookStoreNum = '342680'
And BookItem In ('1','21');
I want the sql to return Results = '2'
but I keep getting total records Results = '3'
I am using Access97.
I am thinking of a Select within a Select, but can't seem to get it working. Any Help in solviing this is appreciated.
I am trying to get a distinct count.
My data looks like this...
StudentId ; BookItem ; BookStoreNum ; BookDate
11564;1;342680;12/15/2001
11564;21;342680;12/15/2001
11564;21;342680;12/22/2001
12244;1;342680;1/11/2001
12244;1;342680;2/24/2001
I want a DISTINCT COUNT
Select Count(BookDate) as Books
FROM RecordsData
Where StudentId = '11564'
And BookStoreNum = '342680'
And BookItem In ('1','21');
I want the sql to return Results = '2'
but I keep getting total records Results = '3'
I am using Access97.
I am thinking of a Select within a Select, but can't seem to get it working. Any Help in solviing this is appreciated.