Re: IN (XX,YY,ZZ) Statement
Posted in 1994
->Subject: IN (XX,YY,ZZ) Statement ->To: Informix Net <rmy.emory.edu!informix-list@uunet.uu.net> ->Date: Mon, 31 Jan 1994 11:05:11 -0800 (PST) ->From: Robert Minter <rob@dssmktg.com> -> ->Why doesn't the following work: -> ->MAIN -> ->DEFINE -> str CHAR( 2 ) -> -> LET str = "12" -> -> IF str IN ( "12", "23", "34" ) THEN -> DISPLAY "True" -> END IF -> ->END MAIN -> ->According to the manual, the -> -> expr [ NOT ] IN ({ items | SELECT-statement }) -> ->is a boolean expression. And the IF statement requires a boolean. ->( Page 2-17 of I-4GL Reference 2, March 1990 Part No. 000-7044 ) -> ->Just wondering. -> -> Robert Minter |Data Systems Support| \\\\\\_/// ->Programmer, Software Development | Orange, CA | ( _ _ ) ->internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) ->bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ -> I used to not know, now I know I don't know. \\_/ Robert, It seems to me that the IN operator is a SQL, not a 4GL, operator. That is, IN is usable in SQL, including embeded SQL, but not in 4GL code in general. There are several such things, including the USER function. Similarly, it also seems that the 4GL TIME function is available only within reports, not within ordinary 4GL functions. These perceptions are based on my rather old versions (1.10 & 2.10) of 4GL and SQL. Later versions may provide more general availability for such things. Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\