Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Talend Gurus,
can anyone let me know how to handle multiple case statement in Tmap?
nvl(CASE WHEN regexp_instr(F1,'/|,| ') = 0 THEN
REPLACE(F1,' ')
ELSE substr(F1,1,regexp_instr(F1,'/|,| ')-1)
END
,F1)
as X1,
CASE WHEN regexp_instr(F1,'/|,| ') = 0 THEN NULL ELSE
REGEXP_REPLACE(SUBSTR(F1, regexp_instr(F1,'/|,| ')),'/|,|')
END AS X2,
(CASE WHEN INSTR (F1,'@',1,2) = 0
OR F1 LIKE '%<%' OR F1 LIKE '%>%' OR UPPER(F1) LIKE '%IN%' OR LENGTH(F1) >= 10
THEN 'Y' ELSE 'N' END) AS Y,
(CASE WHEN INSTR (F1,'@',1,2) = 0 THEN 'A'
WHEN F1 LIKE '%<%' OR F1 LIKE '%>%' THEN 'C'
WHEN UPPER(F1) LIKE '%IN%' THEN 'CI'
WHEN LENGTH(F1) >= 10 THEN 'L'
END) AS Z
Thanks
https://help.talend.com/reader/VXLHZvns6nwhPGeQbm1Iig/2PD0dBEfYwKBhZpu3o4vMA
also StringHandling routine has function for instr and substr
Gurus,
Can anyone let me know what is the function in talend for comparing 2 dates?
greatest (dt1, nvl(dt2,dt1)) as date.
Thanks
Still not resolved. is there any function available rather than writing a routine for this solution?
It works . Please try. you will get your expected result.