Create table main
Following are the values in main table.Name member_type_id
WHEN MEMBER_TYPE_ID = 11 THEN COUNT(MEMBER_TYPE_ID) OVER (PARTITION BY MEMBER_TYPE_ID)
WHEN MEMBER_TYPE_ID = 99 THEN COUNT(MEMBER_TYPE_ID) OVER (PARTITION BY MEMBER_TYPE_ID)
When I run the above query in sql server I get following resultemp_count
However, when I run this query in crystal report, I get the result of only emp_count i.e 2. For sp_count nothing shows. I think the issue is with how crystal is reading the case statement. I don't know if this is the right place for me to ask this question. However, any help will be greatly appreciated. Thanks in advance.