Question : multiple conditions in WHILE

what is wrong in the foll syntax:
WHILE (@Var1 < 1 AND @Var2 < 1)

This does not seem to be honored. When any one of the variable become >1, the loop breaks.

thanks

Answer : multiple conditions in WHILE

exactly.
when any of the 2 > 1, you have:

WHILE ( false AND true )  which is FALSE

you seem to want:


WHILE (@Var1 < 1 OR @Var2 < 1)
Random Solutions  
 
programming4us programming4us