I have searched and searched for the answer and I am certain it has been asked many times before. Unfortunately I cannot find it here and the answers I found doing a web search were not comprehensible to me due to my inexperience.
I have a fairly robust database in Access 07. I recently moved the data to MS SQL Server 05 using Access as a front.
Most of my queries work. However, queries that try to average dates are not supported in SQL Server and are not working. For example.
SELECT [Closed Loans Mainsail].Branch, Avg([A INVESTOR SETTLEMENT TABLE].[Purchase Date]-[Closed Loans Mainsail].[Closing Date]) AS [Avg Days from Close to Investor Purchase]
FROM [Closed Loans Mainsail] INNER JOIN [A INVESTOR SETTLEMENT TABLE] ON [Closed Loans Mainsail].[Loan Number] = [A INVESTOR SETTLEMENT TABLE].[Loan Number]
GROUP BY [Closed Loans Mainsail].Branch;
This worked great until data was moved into SQL Server. Now I receive error #8117 Datatype datetime is invalid for sum operator.
I'm sure there is a common solution you more experienced folks are aware of.
Would anyone care to help? I have to present this information to our executive committee on Monday and now I can't.
Thank you very much.
Marc
(One side note. Some of the datetime queries are working fine. This is very perplexing as I cannot figure out why some work and others don't. Here is an example of one that works.
SELECT [A ENCOMPASS DATA].Branch, Avg((([Closed Loans JV].[Closing Date])-([A ENCOMPASS DATA].[File Started]))) AS [Avg Days From Lead To Close]
FROM [A ENCOMPASS DATA] INNER JOIN [Closed Loans JV] ON [A ENCOMPASS DATA].[Loan Number] = [Closed Loans JV].[Loan Number]
WHERE (((([A ENCOMPASS DATA].[Branch])>"209" And ([A ENCOMPASS DATA].[Branch])<"228")=False))
GROUP BY [A ENCOMPASS DATA].Branch;
It is basically the same as the one that does not work.
I have a fairly robust database in Access 07. I recently moved the data to MS SQL Server 05 using Access as a front.
Most of my queries work. However, queries that try to average dates are not supported in SQL Server and are not working. For example.
SELECT [Closed Loans Mainsail].Branch, Avg([A INVESTOR SETTLEMENT TABLE].[Purchase Date]-[Closed Loans Mainsail].[Closing Date]) AS [Avg Days from Close to Investor Purchase]
FROM [Closed Loans Mainsail] INNER JOIN [A INVESTOR SETTLEMENT TABLE] ON [Closed Loans Mainsail].[Loan Number] = [A INVESTOR SETTLEMENT TABLE].[Loan Number]
GROUP BY [Closed Loans Mainsail].Branch;
This worked great until data was moved into SQL Server. Now I receive error #8117 Datatype datetime is invalid for sum operator.
I'm sure there is a common solution you more experienced folks are aware of.
Would anyone care to help? I have to present this information to our executive committee on Monday and now I can't.
Thank you very much.
Marc
(One side note. Some of the datetime queries are working fine. This is very perplexing as I cannot figure out why some work and others don't. Here is an example of one that works.
SELECT [A ENCOMPASS DATA].Branch, Avg((([Closed Loans JV].[Closing Date])-([A ENCOMPASS DATA].[File Started]))) AS [Avg Days From Lead To Close]
FROM [A ENCOMPASS DATA] INNER JOIN [Closed Loans JV] ON [A ENCOMPASS DATA].[Loan Number] = [Closed Loans JV].[Loan Number]
WHERE (((([A ENCOMPASS DATA].[Branch])>"209" And ([A ENCOMPASS DATA].[Branch])<"228")=False))
GROUP BY [A ENCOMPASS DATA].Branch;
It is basically the same as the one that does not work.
