Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread IF AND CASE
Mon, Sep 1 2008 12:41 PMPermanent Link

Dieter Nagy
Hello,

when I use:

FETCH FIRST FROM STATCURSOR  INTO ZWISCHEN1,ZWISCHEN;


                    WHILE NOT EOF(STATCURSOR) DO
                    IF ZWISCHEN1 < 5 THEN  UPDATE STATCURSOR SET STATUS1  = 'FÄLLIG';
                    END IF;
                    FETCH NEXT FROM STATCURSOR INTO ZWISCHEN1,ZWISCHEN;
                    END WHILE;

it works.

with CASE

                   WHILE NOT EOF(STATCURSOR) DO
                    CASE zwischen1
                    when  < 5 THEN  UPDATE STATCURSOR SET STATUS1  = 'FÄLLIG';
                    END CASE;
                    FETCH NEXT FROM STATCURSOR INTO ZWISCHEN1,ZWISCHEN;
                    END WHILE;

The Error is: 700 Expected expression but instead found <

Is this with CASE not possible?

TIA
Dieter
Mon, Sep 1 2008 1:32 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dieter

From my understanding of looking at the OLH there are two formats for CASE. The long version is essentially the same as a series of IFs with the full test for each WHEN and with the short version CASE is essentially an equality operator a bit more like the Delphi approach.

Mind you I sort of like your attempt - it seems rather neat.

Roy Lambert [Team Elevate]
Mon, Sep 1 2008 2:02 PMPermanent Link

Dieter Nagy
Roy,

thanks, I will do it with IF, but with many ifs it's not so easy Smiley

Dieter












Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Dieter

From my understanding of looking at the OLH there are two formats for CASE. The long version is essentially the same as a series of IFs with the
full test for each WHEN and with the short version CASE is essentially an equality operator a bit more like the Delphi approach.

Mind you I sort of like your attempt - it seems rather neat.

Roy Lambert [Team Elevate]
Image