Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > I

IFEQ

Scroll Prev Top Next More

(IFEQ(arg1,arg2,arg3,arg4))

 

If arg1 and arg2 are equal, IFEQ returns the value of arg3. If arg1 and arg2 are not equal, IFEQ returns the value of arg4. The data types of arg1 and arg2 must match and the data types of arg3 and arg4 must match.

 

The following command changes the value of the thiscol column to 100 if the values of the variables vaval and vbval are equal. If vaval and vbval are not equal, the value of thiscol becomes 200 in rows where thiscol is greater than or equal to 100.

 

UPDATE thistab SET thiscol=(IFEQ(.vaval, .vbval, 100, 200))+

WHERE thiscol >= 100

 

See IFCASEEQ for case-sensitive text comparisons.