Crystal 8.5
SQL Database
I have to write a report where I need to group specific charge codes by date. For example:
Svc CD Svc Date Service DTotal (trying to get this #)
3610079 4/1/2005 1
1671008 4/1/2005
3610079 4/2/2005 1
1671008 4/2/2005
3610079 4/3/2005 1
1671008 4/3/2005
3610079 4/4/2005 1
1671008 4/4/2005
3610079 4/5/2005 1
1671008 4/5/2005
3610079 4/6/2005 0
I need the service dtotal counted as '1' if the charge code is one of [1671007,1671008,1671014,1671016] AND [3610079 or 3610076}. The service dates need any combination of both sets of numbers, if the service does then I want it to be counted as 1 else 0.
SQL Database
I have to write a report where I need to group specific charge codes by date. For example:
Svc CD Svc Date Service DTotal (trying to get this #)
3610079 4/1/2005 1
1671008 4/1/2005
3610079 4/2/2005 1
1671008 4/2/2005
3610079 4/3/2005 1
1671008 4/3/2005
3610079 4/4/2005 1
1671008 4/4/2005
3610079 4/5/2005 1
1671008 4/5/2005
3610079 4/6/2005 0
I need the service dtotal counted as '1' if the charge code is one of [1671007,1671008,1671014,1671016] AND [3610079 or 3610076}. The service dates need any combination of both sets of numbers, if the service does then I want it to be counted as 1 else 0.