Hello everyone,
I have this query:
There is another field in the same table ([DN11 TABLE (Access Points)].Provider ID) that stores an ID number. I need to adjust the above query to do the same counts except now it needs to be based on unique ID's (or values) from the [DN11 TABLE (Access Points)].Provider ID field.
Any help would be appreciated!
Msk7777
I have this query:
Code:
INSERT INTO [DN11 (AP) County Counts] ( [Data Month], [Data Year], State, County, [General Dentist], Endodontist, Orthodontist, [Oral Surgeon], [Pediatric Dentist], Periodontist, Prosthodontist, [Total Providers] ) IN '\\cifs04\NetworkDevelopment\Provider File Databases\Network Stats.accdb'
SELECT [DN11 TABLE (Access Points)].[Data Month], [DN11 TABLE (Access Points)].[Data Year], [DN11 TABLE (Access Points)].State, [DN11 TABLE (Access Points)].County, Count(IIf([Specialty]="General Dentist",1)) AS [General Dentist], Count(IIf([Specialty]="Endodontist",1)) AS Endodontist, Count(IIf([Specialty]="Orthodontist",1)) AS Orthodontist, Count(IIf([Specialty]="Oral Surgeon",1)) AS [Oral Surgeon], Count(IIf([Specialty]="Pediatric Dentist",1)) AS [Pediatric Dentist], Count(IIf([Specialty]="Periodontist",1)) AS Periodontist, Count(IIf([Specialty]="Prosthodontist",1)) AS Prosthodontist, Count([DN11 TABLE (Access Points)].County) AS [Total Providers]
FROM [DN11 TABLE (Access Points)]
GROUP BY [DN11 TABLE (Access Points)].[Data Month], [DN11 TABLE (Access Points)].[Data Year], [DN11 TABLE (Access Points)].State, [DN11 TABLE (Access Points)].County;
Any help would be appreciated!
Msk7777