Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summary Portion of Query returns wrong values
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00717292
Message ID:
00717658
Views:
26
Hi Kirk,

Shouldn't it be SUM() not COUNT()?
select det.specDesc,
	det.surgeon,
	SUM(det.doccount) as doccount,
        ...
>I'm still working on this darn thing, thought I had it until I went through the details. If I just run the detail part of the query by itself, I get the right number of detail records 33. If I run the complete thing returning the summary values, I get a doc count of 27. I've got it filtered for testing to just one doctor.
>
>Thanks for any help.
>
< snip >
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform