B
bdehning
I have a query based on two joined tables and need to know how to insert SQL into existing sQL so my query counts "Assigned Consultant" Properly. if the following
BOB
Bob
Glen
Glen
SAm
I only want the countofAssigned Consultant to come out as three in my report based on the total query and not 5.
This is the query without the field for count of Assigned consultant that was giving me the duplicating count problem.
Help, place the following
"SELECT Count([Assigned Consultant]) FROM (SELECT DISTINCT [Assigned
Consultant] FROM [Location])" into the following SQL so that each consultant for each record is only counted once.
I need help in placing into this existing SQL.
SELECT DISTINCT [Account Information].[Policy Number], [Account Information].[Account Name], [Account Information].EAP, [Account Information].[Class Code], [Account Information].[Expiration Date], [Account Information].[Service Frequency], [Account Information].[Nature of Operations], Sum([Account Information].EAP) AS
SumOfEAP, [Account Information].[X-Mod], Location.[Assigned Consultant], Location.[Location Servicing Division]
FROM [Account Information] LEFT JOIN Location ON [Account Information].[Policy Number] = Location.[Policy Number]
GROUP BY [Account Information].[Policy Number], [Account Information].[Account Name], [Account Information].EAP, [Account Information].[Class Code], [Account Information].[Expiration Date], [Account Information].[Service Frequency], [Account Information].[Nature of Operations], [Account Information].[X-Mod], Location.[Assigned Consultant], Location.[Location Servicing Division];
I appreciate your efforts but am a rookie at sql's and how they work. SO please help with the code.
BOB
Bob
Glen
Glen
SAm
I only want the countofAssigned Consultant to come out as three in my report based on the total query and not 5.
This is the query without the field for count of Assigned consultant that was giving me the duplicating count problem.
Help, place the following
"SELECT Count([Assigned Consultant]) FROM (SELECT DISTINCT [Assigned
Consultant] FROM [Location])" into the following SQL so that each consultant for each record is only counted once.
I need help in placing into this existing SQL.
SELECT DISTINCT [Account Information].[Policy Number], [Account Information].[Account Name], [Account Information].EAP, [Account Information].[Class Code], [Account Information].[Expiration Date], [Account Information].[Service Frequency], [Account Information].[Nature of Operations], Sum([Account Information].EAP) AS
SumOfEAP, [Account Information].[X-Mod], Location.[Assigned Consultant], Location.[Location Servicing Division]
FROM [Account Information] LEFT JOIN Location ON [Account Information].[Policy Number] = Location.[Policy Number]
GROUP BY [Account Information].[Policy Number], [Account Information].[Account Name], [Account Information].EAP, [Account Information].[Class Code], [Account Information].[Expiration Date], [Account Information].[Service Frequency], [Account Information].[Nature of Operations], [Account Information].[X-Mod], Location.[Assigned Consultant], Location.[Location Servicing Division];
I appreciate your efforts but am a rookie at sql's and how they work. SO please help with the code.