Good morning,
I have a little SQL dilemma. I have a DO CASE...ENDCASE with 2 SQL queries per case, each going to a different cursor. My boss wants 2 record counts from the master table, based on 2 conditions. Is there any way to do that within one or both of the SQl statements??
Example
SELECT ass_l_ata,s_or_type FROM temp ;
INTO TABLE cleared ;
WHERE s_status = 'Cleared' ;
ORDER BY ata
lnClearedCount = RECCOUNT()
SELECT ass_l_ata,s_or_type FROM temp ;
INTO TABLE outstanding ;
WHERE NOT s_status = 'Cleared' ;
ORDER BY ata
lnOutstandingCount = RECCOUNT()
The conditions are set on the s_or_type field where I need to count 2 of the 3 possible types.
Perry
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.