troubleshooting Question

multiple fields in aggregate

Avatar of Glen Gibb
Glen GibbFlag for Canada asked on
Microsoft SQL Server
4 Comments1 Solution284 ViewsLast Modified:

I need to move data from tblResults into tblReports.

tblResults looks like this:

ID  Method  Value
1       12        13.2
2       12        12.5
3       13        27.4
4       13        13.1

tblResults needs to be:
ID      NO3N     P
1         25.7     40.5

My "SELECT Sum(Value) AS NO3N WHERE Method = 12" picks up one value but bombs when I try to nest another.

Can you give me a model?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros