This topic is locked

Chart Formatting

12/5/2007 11:20:04 AM
ASPRunnerPro General questions
S
stealthwifi author

Hello,
I am trying to make a graph that shows a total number by a year and also displays a dollar value.

My problum is I am not very good at writing SQL querys and what I have doesnt seem to work. My query is as follows:

Select Policy.StartDate, Policy.EndDate, Policy.Client, Claims.lob, Claims.Paid

from Claims, Policy

WHERE Policy.PolicyID = Claims.PolicyID


That part works great except I need to group it by the Claims.lob and when I do it keeps saying all the other values cant be there (Policy.StartDate.....)
I also need to do the same thing but Sum the Claims.Paid and I get the same problum.
Can anyone offer any advise on how to format this query or a better way of creating the graph?

It just needs to show the lob & Paid and using the advanced search they can filter it down for the proper years and Client they want to view.
Thank you!

Sergey Kornilov admin 12/5/2007

It looks like you need to learn a bit more about GROUP BY queries.

I recommend to check the following tutorial:

http://www.webcheatsheet.com/sql/interacti...sql_groupby.php

S
stealthwifi author 12/6/2007

Thank you very much, the tutorial page was exactly what I needed!