Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excluding with where

Dear Community,

I would like to exclude whith "where" all the materials which started by 4and 5. I have no idea how to do this. Here is my actually coding but it doesn't work :

[..\..\SOURCES\SAP\ERP\MARA_MATERIAL_MASTER.qvd](qvd)WHERE Material_MATNR <> '4*' and Material_MATNR <> '5*';

Could anyone help me?

Thanks!!!

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Change this part

WHERE Material_MATNR <> '4*' and Material_MATNR <> '5*';

to

WHERE Not WildMatch(Material_MATNR, '4*' ,'5*');

or

WHERE WildMatch(Material_MATNR, '4*' ,'5*')>0;

Celambarasan

View solution in original post

7 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

If you want to remove all rows when Material_MATNR started with 4 or 5 the use:

Where  Not Wildmatch(Left(Material_MATNR,1),'4','5') ;

OR

Where  Wildmatch(Left(Material_MATNR,1),'4','5') =0;

Hope this will help

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Change this part

WHERE Material_MATNR <> '4*' and Material_MATNR <> '5*';

to

WHERE Not WildMatch(Material_MATNR, '4*' ,'5*');

or

WHERE WildMatch(Material_MATNR, '4*' ,'5*')>0;

Celambarasan

Not applicable
Author

Hello Vijay Singh,

sorry that I reply so late, but I was not in the company. Your answer is absolutely wright and your soultion worked. I hope that you get your 10 points. Thanks a lot!!

Mit freundlichen Grüßen/ Best regards

Walter

Not applicable
Author

Hello Celambarasan,

sorry that I reply so late, but I was not in the company. Your answer is absolutely wright and your soultion worked. I hope that you get your 10 points. Thanks a lot!!

Mit freundlichen Grüßen/ Best regards

Walter

SunilChauhan
Champion
Champion

try below code

where Material_MATNR <>if(findoneof(Material_MATNR ,'45'),Material_MATNR );

hope this helps

Sunil Chauhan
SunilChauhan
Champion
Champion

or try this code

where Material_MATNR <>if(findoneof(Material_MATNR ,'4*'),Material_MATNR ) and sale<>if(findoneof(Material_MATNR ,'5*'),Material_MATNR );

hope this helps

Sunil Chauhan
Not applicable
Author

Hello Sunil Chauhan,

thanks a lot for your helpful answer and I would like to give you 5 points. The problem at your solution is, that all materials with a 4 or 5 will be excluded. For example: A material 100020512 will not be shown because of the 5 in it. Please watch the other solutions, they are correct. But really thank you very much for your proffessional reply.

Greetings

Walter