Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI ALL

I WANT TO USE THE MULTIPLE HAVING COUNT. Pls find of my below code. I can able to take a count of
CUST_FOLIO_NO Can anyone tell me the syntax for taking the count of com_ref_no also.
Pls provide your suggestion.

SQL
select cust_folio_no,com_ref_no
     from d_trxn_perm where
     LOAD_MMYY IN ('052010','042010','032010') AND
     to_char(due_date,'mmyyyy') IN ('052010','042010','032010')and rownum < 10000
     and rbi_reject_code IN ('01','11','02','12','03','13','04','14','05','15') and
     client_recon_status_code in ('F','F1')
     group BY CUST_FOLIO_NO HAVING COUNT(cust_folio_no) 



Rgds
Jagadesh
Posted
Comments
ssd_coolguy 7-Jun-12 2:07am    
hey can u please explain more.. what exactly you want?
Kumar from madras 7-Jun-12 5:28am    
THANKS FOR YOUR REPLY
I FOUND A SOLUTION

RGDS
JAGADESH
Maciej Los 7-Jun-12 16:25pm    
Please, share your code and mark a question as "solved".

1 solution

Hi Kumar,
Try this below query,
SQL
select cust_folio_no,com_ref_no
     from d_trxn_perm where
     LOAD_MMYY IN ('052010','042010','032010') AND
     to_char(due_date,'mmyyyy') IN ('052010','042010','032010')and rownum < 10000
     and rbi_reject_code IN ('01','11','02','12','03','13','04','14','05','15') and
     client_recon_status_code in ('F','F1')
     group BY CUST_FOLIO_NO HAVING COUNT(cust_folio_no)=value and Count(com_ref_no) = value 


Hope it'll help you.


Regards,
Bluesathish
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900