Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

WHERE field IN ('A','B') clause in LOAD statement


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é

1 Solution

Accepted Solutions
Not applicable
Author

Hi

you forgot the "group by" clause

rgds

View solution in original post

7 Replies
Not applicable
Author

Hi

where match(Field,'A','B','C')

Rgds

Not applicable
Author

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 ?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Try

WHERE Match(log_index, ...) > 0;

Best,

Peter

Not applicable
Author

Hi

you forgot the "group by" clause

rgds

MayilVahanan

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;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

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

v_iyyappan
Specialist
Specialist

Hi,

If u get correct answer means please close the discussion and give mark. that is encourage for us.

regards,