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.

Reply via email to