Комментарии:
Key Kaush, recently watched this video and I really liked it, but it got me thinking about, what if I have a bigger table so the solution using loop could be a little bit slow, so I thought about doing it using Concat to bring all the possibilities in a variable. Let me know what do you think (My first language is portuguese, don't mind it hahaha)
MAP_TMP:
LOAD
*,
Rowno() as Ordem
;
LOAD * INLINE [
De , Para
STRIAS , INDÚSTRIAS
LABORATORIOS , LABORATORIOS
HOSPITAIS , HOSPITAIS
FORNECEDORES DIVERSOS , FORNECEDORES DIVERSOS
DISTRIBUIDORES , DISTRIBUIDOR
CONSUMIDOR FINAL , CONSUMIDOR FINAL
CLINICA , CLÍNICA
];
NOCONCATENATE
MAP_CANAL:
LOAD
Concat(Chr(39) & '*' & De & '*' & Chr(39),',',Ordem) as De,
Concat(Chr(39) & Para & Chr(39),',',Ordem) as Para
RESIDENT MAP_TMP;
DROP TABLE MAP_TMP;
LET vDe = PEEK('De');
LET vPara = PEEK('Para');
DROP TABLE MAP_CANAL;
LOAD
*,
PICK(WILDMATCH(endereco_loja,$(vDe)),$(vPara)) as CANAL
FROM xxx
Thanks for posting! gives me some ideas for my own work.
Question - Could you accomplish the same by using ifmatch?
Awesome,,, 🙌🏻
ОтветитьVery good tips! Exactly what I am looking for!
Ответить