20 Replies Latest reply: May 21, 2013 8:00 AM by Robert Ebner RSS

    if - elseif construction

    Robert Ebner

      Hi all,

       

      I would like to use the following statement in my script, but it doesn't work:

      "reisezeit" is a variable which can be 0 or 1.

       

      if reisezeit = 1 then

                                    sum(if(Reisezeit='Nein', Stunden) )as Stunden_Projekt;

                                    elseif

                                    reisezeit = 0

                                    sum(Stunden) as Stunden_Projekt;

                                    ELSE

                                    sum(Stunden) as Stunden_Projekt;

                          end if

       

      Does someone has an idea why?

       

      Thank you for your help.