How do i show this in a Pass Through Query

papic1972

Registered User.
Local time
Tomorrow, 01:35
Joined
Apr 14, 2004
Messages
122
Hi all,

Does anyone know how i would show this in a Pass Through Query?:

Sum(tblLocal.MinQty) AS SumOfMinQty,

I get the following error:

ODBC--call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server] The sum or average aggregate operation cannot take nvarchar data type as an argument. (#409)
:eek:
 
What is the data type of that field? It should be numeric. If you can't change it, you can try using the CAST function to convert it (or the CONVERT function, but I think CAST is more efficient in this case). More info in BOL on both.
 
Yes Paul! I used the CONVERT function & it works!
Thank you for triggering my brain!!
 

Users who are viewing this thread

Back
Top Bottom