Razzak:

Thank you. Elegant, fast, thought-provoking, and very much appreciated.

LeaR:ning every day, Bruce

Bruce A. Chitiea | SafeSectors, Inc.
112 Harvard Ave #272 | Claremont CA 91711-4716 | USA
[email protected] | +011 (909) 238-9012 c | +011 (909) 912-8678 f


------ Original Message ------
From: "A. Razzak Memon" <[email protected]>
To: [email protected]
Sent: 6/18/2021 4:59:28 PM
Subject: Re: [RBASE-L] - IFF Function Quandry

Bruce,

Here is a completely different way to get the same resulting text value as this 
expression:

(IFF('TrxMonth IN (1,2,3)','Q1', (IFF('TrxMonth IN (4,5,6)','Q2', 
(IFF('TrxMonth IN (7,8,9)','Q3','Q4'))))))

And, alternately, try this instead:

('Q'+(CTXT(INT(1+(INT(TrxMonth)-1)/3))))

Have fun!

Very Best R:egards,

Razzak


At 04:15 PM 6/16/2021, Bruce Chitiea wrote:

RBGX5E Current (Best viewed in monospaced font)

The trxMonth and trxQuarter columns are each defined as TEXT (2).

This statement:

UPDATE fts_input_tt +
SET trxQuarter = +
(IFF('trxMonth IN (1,2,3)','Q1','xx'))

... correctly updates trxQuarter with value Q1 where the value of trxMonth is 
in (1,2,3) and with 'xx' for all other values of trxMonth.

This statement:

UPDATE fts_input_tt +
SET trxQuarter = +
(IFF('trxMonth IN (1,2,3)','Q1', +
(IFF('trxMonth IN (4,5,6)','Q2','XX'))))

... returns the error:

Parentheses required around the list of items for the IN clause. (2304)

... and aborts the UPDATE.

???

Thanks for your assistance

Bruce A. Chitiea |Â SafeSectors, Inc.



-- For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1MY6bJ-1lmRkz2ylx-00YTSh%40mrelay.perfora.net.

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/emd73bbea5-17fc-4cb0-a259-ba60d4a6cdcc%40pathfinder.

Reply via email to