select count(adj_code), adj_code, adj_desc, sum(amount) from REPORT_ADJUSTMENT WITH(NOLOCK) inner join REF_ADJUSTMENT_CODES...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
on REPORT_ADJUSTMENT.adjustment_code = REF_ADJUSTMENT_CODES.adj_code
But receive the following:
"The sum or average aggregate operation cannot take a varchar data type as an argument"
Dig Deeper on SQL-Transact SQL (T-SQL)
Related Q&A from Greg Low
Should developers be granted permissions to production queue in a SQL Server environment? See why expert Greg Low suggests proc access by WITH ...continue reading
A SQL Server application that needs user permission to create and modify tables in SQL Server 2005 may be handled best via a schema.continue reading
Find how to save stored procedure output to the network drive via SQL Server Management Studio.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.