If statement in query string?

progressing

New Member
Is this possible? I can't seem to get it to work..

Code:
FOR EACH myTable
  WHERE (IF (mytable.Flag = TRUE) THEN myTable.attribute1 = "12" ELSE myTable.attribute2 = "10").
END.
 
hi progressing,

I think you should try to use. (i'm not sure is it what you want to do,but from your logic maybe i can imagine this is what you want.:awink:)

FOR EACH myTable
WHERE (mytable.Flag = TRUE and myTable.attribute1 = "12" )

or (mytable.flag = false and myTable.attribute2 = "10").
END.


instead of

FOR EACH myTable
WHERE (IF (mytable.Flag = TRUE) THEN myTable.attribute1 = "12" ELSE myTable.attribute2 = "10").
END.
 
Back
Top