Focal Point
Problem with Define

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4601078331

June 17, 2005, 02:39 PM
<Lee Roper>
Problem with Define
This is probably a really simple question, but I've searched and I can't find an answer...

I'm doing a Define using an IF statement, and included in the text that I am looking for is an ampersand (&).

IF (BEN_ID_CD EQ 'AD&D') THEN 'AD&PL'
ELSE 'Other';

WebFocus gives me this error: 0 ERROR AT OR NEAR LINE 72 IN PROCEDURE MEMFEX FOCEXEC *
(FOC295) A VALUE IS MISSING FOR: D

I can't remove the ampersand because it does exist in my data. I would have thought surrounding the phrase with ' ' would have separated it for WebFocus, but it does not seem to be working. I'm sure this is probably something very simple, but it's driving me nuts, so any help would be appreciated.
June 17, 2005, 03:20 PM
dhagen
If its not too much trouble, separate the & and the following character with a pipe |.

IF (BEN_ID_CD EQ 'AD&|D') THEN 'AD&|PL'
ELSE 'Other';
June 17, 2005, 04:16 PM
<Lee Roper>
Thanks! That worked!