i need some help with an SELECT statement that i wrote.
The statement looks like:
SELECT DISTINCT MANDT, PATH301
FROM NC301B
WHERE EDIPROC like 'P30_'
AND (LF301M > 0)
AND (MANDT LIKE '011')
AND (PATH301 NOT LIKE '%:\saptemp%')
AND (PATH301 NOT LIKE '%:\SAPTEMP%')
AND (PATH301 NOT LIKE '%usr%')
AND (PATH301 NOT LIKE '%:\Windows%')
AND (PATH301 NOT LIKE '%PKV_DAV%')
AND (PATH301 NOT LIKE '%pkv_dav%');
Now i need to check for an additional MANDT -> MANDT LIKE '012'
My problem is that the output is not correct when i add the line OR (MANDT LIKE '012') to the statement.
My idea was:
SELECT DISTINCT MANDT, PATH301
FROM NC301B
WHERE EDIPROC like 'P30_'
AND (LF301M > 0)
AND (MANDT LIKE '011')
OR (MANDT LIKE '012')
AND (PATH301 NOT LIKE '%:\saptemp%')
AND (PATH301 NOT LIKE '%:\SAPTEMP%')
AND (PATH301 NOT LIKE '%usr%')
AND (PATH301 NOT LIKE '%:\Windows%')
AND (PATH301 NOT LIKE '%PKV_DAV%')
AND (PATH301 NOT LIKE '%pkv_dav%');
Is it possible to check for two or more MANDT Values in one statement
like i did in my example?
Thank you!
...AND MANDT IN ('011', '012')....MANDT= '011'cant you use this?% , _ , [ , ]