Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using IF condition

Former Member
0 Likes
633

In my Report i have two variables Z1 ana Z2.

If Z1 and Z2 >= 100 then 'select' statement should execute inside IF....ENDIF.when im coding like this

IF (Z1 AND Z2) >= 100.

SELECT STATEMENT

ENDIF, it is generating error.Please help.

Thanks

K Srinivas

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
604

hi,

you have to do like this:

IF Z1 GE 100 AND Z2 GE 100
SELECT...
ENDIF.

hope this helps

ec

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
605

hi,

you have to do like this:

IF Z1 GE 100 AND Z2 GE 100
SELECT...
ENDIF.

hope this helps

ec

Read only

Former Member
0 Likes
604

You have to split Z1 and Z2 like this:

IF ( Z1 GE 100 ) AND ( Z2 GE 100 ).

  SELECT ....

ENDIF.

using ( ) is good for code readability.

Edited by: Kev Mycock on Jul 9, 2008 4:57 AM

Read only

Former Member
0 Likes
604

Hi,

Check this :

IF z1 GE 100 AND z2 GE 100.
*<select statement>
ENDIF.

Regards

Adil

Read only

Former Member
0 Likes
604

Hi,

IF (Z1 GE 100) AND (Z2 GE 100).

SELECT ....

ENDIF