>I want to select the records like
>
>If grade=F
>message="Very poor fail"
>If grade=E
>message="very poor
>endif
>endif
>
>select code,name,grade,;
>CAST(SUM(IIF(grade="F",1,0)) AS I) "Very poor fail"
>CAST(SUM(IIF(grade="E",1,0)) AS I) "Very poor "
>..........
> from student
>thanks
CREATE CURSOR Student (Code I, Name C(50), grade C(1))
INSERT INTO Student VALUES(5,[toto],[E])
INSERT INTO Student VALUES(4,[Mito],[E])
INSERT INTO Student VALUES(5,[Gogo],[F])
INSERT INTO Student VALUES(2,[Mich],[F])
INSERT INTO Student VALUES(1,[bibi],[E])
select code,name,;
CAST(IIF(grade="F","Very poor fail","Very poor") AS CHAR(50)) AS lcText;
FROM Student;
INTO CURSOR crsTest
BROWSE NORMAL
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst