LIKE - Is Like #
The Is Like (Like) operator checks to see if the value in Operand 1 is the same as the value in Operand 2. (Operand 2 must be a masked string using acceptable Oracle search criteria).
- Statement
- If the employee is in any sales department, give a bonus of $500.00 (stored in PC 5000).
Line | CMD | OT | Operand 1 | OPER | OT | Operand2 | OT | Operand3 | If Goto | Else GoTo |
---|---|---|---|---|---|---|---|---|---|---|
00010 | IF | DB | DDP.DEPARTMENT_CODE | LIKE | A | SALES% | 00100 | 99999 | ||
00100 | LET | PC | 5000 | EQ | N | 500 | 99999 | |||
99999 | EXIT | 99999 |
In the example shown above, if the employee’s department began with the string ‘SALES’, the UserCalc would go to line 100 to give the bonus. Acceptable department codes would be ‘SALES-001’ or ’SALESHeadOffice’ but not ‘GroupSALES’.