Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filter output 1

Status
Not open for further replies.

sipooh

Programmer
Mar 10, 2006
1
US
(
SELECT DISTINCT C.PRESCRIBER_NM, C.CITY_TX, C.STATE,
Sum(B.RX_COUNT_QY) as Claims


FROM CLAIMSA.TCLIENT1 A
CLAIMSA.TRXCLM_BASE B
CLAIMSA.TPRSCBR_PRESCRIBE1 C


WHERE A.CLIENT_ID = B.CLIENT_ID AND
A.CLIENT_ID in (12115, 12494) AND
B.FILL_DT Between '01-01-2005' AND '12-31-2005' AND
B.NTW_PRESCRIBER_ID = C.PRESCRIBER_ID


Group by C.PRESCRIBER_NM, C.CITY_TX, C.STATE

);


Want this output: "Sum(B.RX_COUNT_QY) as Claims" to show only if the value is >500. How do I do that?
 


Add:

HAVING Sum(B.RX_COUNT_QY) > 500 [3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 

PS: After the Group By [bigcheeks]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top