2007 Dec 06 2:50 PM
Is it possible to write a case statement like the following:
Case table_size.
when 0.
when > 0 and < 1000.
when > 1000 and <2000.
when others.
endcase.
2007 Dec 06 2:52 PM
No, you can not. You have to write If statement in this case.
Regards,
Satish
No, you can not. You have to write If statement in this case.
Regards,
Satish
2007 Dec 06 2:52 PM
No, you can not. You have to write If statement in this case.
Regards,
Satish
2007 Dec 06 2:54 PM
No, I don't think you can use CASE like this
Instead you need to go for IF
-Pavan
2007 Dec 06 3:11 PM
You can not use the ">" or "<" symbols in the Case statements, they are unknown and will be treated like a field thats been defined by a data statement. Its simply easier to use the conditional IF/ELSE/ENDIF statements when dealing with ranges.
2007 Dec 06 3:10 PM
you have to use IF ... :
IF tablesize EQ 0.
...
ELSEIF tablesize GT 0 AND tablesize LT 1000.
...
ELSEIF ...
ENDIF.
hope this helps
ec
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |