Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to select mutliple rows on a resident table using where clause with multiple values of the field.
I tried this below as I do it usually on SQL :
LOAD *
Resident Table
where field in ('A','B','C');
But it didn't work out.
Is there any function in LOAD statement giving the same result ?
Thanks,
Bertrand Lesné
Hi
where match(Field,'A','B','C')
Rgds
Thanks for that quick answer.
In fact, I already tried thsi before but it failed.
I did it again after your answer, here is the result :
Invalid expression
Envoi_Facture:
Mapping
LOAD doc_id,
max(stamp_date) as Date_Envoi_Facture
Resident ACTION_LOG
where match(log_index,'1010','1018','1020','1006','2007','2008','2009','10503');
Any idea ?
Try
WHERE Match(log_index, ...) > 0;
Best,
Peter
Hi
you forgot the "group by" clause
rgds
Hi
Try like this
Envoi_Facture:
Mapping
LOAD doc_id,
max(stamp_date) as Date_Envoi_Facture
Resident ACTION_LOG
where match(log_index,'1010','1018','1020','1006','2007','2008','2009','10503')
Group by doc_id;
You were right Hector. I forgot the Group by.
Sorry for that.
No need for the >0.
Thank you guys for your help.
Have a good day
Hi,
If u get correct answer means please close the discussion and give mark. that is encourage for us.
regards,