Duey, couldn't you build a list, using something like :
SELECT +
LISTOF(Prefixes) +
INTO +
vFemalePrefixes IND vFPi +
FROM +
PREFIX_TABLE +
WHERE +
DefaultGender="Female"
SELECT +
LISTOF(Prefixes) +
INTO +
vMalePrefixes IND vFPi +
FROM +
PREFIX_TABLE +
WHERE +
DefaultGender="Male"
-- `PREFIX`, here, may be interchangeable w/`TITLE`
as part of a startup routine - since this list will (should) rarely change
within a session, perhaps even years, the value-list is virtually static.
Then, you could use, say :
--Assumes that all quote settings are kosher
IF vPrefix IN (&vFemalePrefixes) THEN
SET VAR vGender="FEMALE"
ELSE
IF vPrefix IN (&vMalePrefixes) THEN
SET VAR vGender="MALE"
ELSE
SET VAR vGender="AMBIGUOUS"
ENDIF
ENDIF
whether it's in a command file or in a stored proc.
Some of the other folks might come up w/better ideas, but maybe this'll
help.
Later,
Steve in Memphis
----- Original Message -----
From: "Duey Heffelfinger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 1:32 PM
Subject: IFIN function possibility
> Good Morning,
>
> Unfortunately I haven't had time to be a beta tester for the new
> versions, but I do have a function request that might help someone
> beyond just me. If you are a beta tester and would find it useful
> would you please submit the idea for me? Thanks! Here's the
> function:
>
> If arg1 is IN arg2list return arg3, otherwise return arg4.
> (IFIN(arg1,arg2list,arg3,arg4))
>
> This could easily be used in a select statement for example:
>
> SELECT (IFIN(title,'Mrs,Ms,Miss','Female','Male')) +
> FROM tableview
>
> Would display Male or Female based on the IFIN list. Otherwise you
> have to use 3 IFEQ functions to accomplish the same thing.
> Occasionally my statements have gone over the limit, so I end up
> looking for creative ways to accomplish this type of statement.
>
> Duey
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + Duey Heffelfinger, Director of Computer Services
> +
> + E-mail: [EMAIL PROTECTED] Dana College
> +
> + Phone : 402-426-7289 2848 College Drive
> +
> + Blair, Nebraska 68008
> +
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + If you can dream it, it can come true!
> +
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/