Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to know how can I male a IN clause (typical SQL) in Qlicjkiew. Do I have to use match function?
LOAD fecha,
(Date(monthstart(fecha), 'MMM-YY')) as periodo,
WeekDay(fecha) as dia_semana,
ciudad,
pais,
cliente,
producto,
venta,
margen,
if (producto in ('P1', 'P2'), 'T1', 'T2') as tipo_producto,
tipo_servicio,
canal
FROM
(ooxml, embedded labels, table is detalle_ventas_canal_margen);
Thanks in advance,
Try :
if ( match ( producto , 'P1', 'P2' ) , 'T1', 'T2' ) as tipo_producto,
u can also try, if ( wildmatch ( producto , 'P1', 'P2' ) , 'T1', 'T2' ) as tipo_producto,
Following post might be helpful
Hi Jaun,
You can use below expression
if (producto mixmatch ('P1', 'P2'), 'T1', 'T2') as tipo_producto
Best Regards
Shambhu B