sgp_imported
Technical User
The following query works fine until I try to add another criteria to filter out: not like "S*" or not like "L*" (When I do it ignores both criteria)
------------------------------------------------------------
SELECT
[T1 Net Data].INVOICE_NUMBER,
Min([T1 Net Data].CUSTOMER_NUMBER) AS MinOfCUSTOMER_NUMBER,
Min([T1 Net Data].CUSTOMER_NAME) AS MinOfCUSTOMER_NAME,
Min([T1 Net Data].Salesman_Number) AS MinOfSalesman_Number,
Max([T1 Net Data].Datevalue2) AS MaxOfDatevalue2,
Min([T1 Net Data].Datevalue1) AS MinOfDatevalue1,
Min(OAUSER_SALESMAN.CLASS_CODE) AS MinOfCLASS_CODE
FROM [T1 Net Data] LEFT JOIN OAUSER_SALESMAN ON [T1 Net Data].Salesman_Number = OAUSER_SALESMAN.SALESMAN_NUMBER
GROUP BY [T1 Net Data].INVOICE_NUMBER
HAVING
(((Min([T1 Net Data].CUSTOMER_NUMBER))not Like "S*"
AND
((Max([T1 Net Data].Datevalue2))>=#1/1/2002# And (Max([T1 Net Data].Datevalue2))<#1/1/2003#));
------------------------------------------------------------
My problem is when I try to add another criteria to filter out: not like "S*" or not like "L*" (When I do it ignores both criteria)
Thanks!
------------------------------------------------------------
SELECT
[T1 Net Data].INVOICE_NUMBER,
Min([T1 Net Data].CUSTOMER_NUMBER) AS MinOfCUSTOMER_NUMBER,
Min([T1 Net Data].CUSTOMER_NAME) AS MinOfCUSTOMER_NAME,
Min([T1 Net Data].Salesman_Number) AS MinOfSalesman_Number,
Max([T1 Net Data].Datevalue2) AS MaxOfDatevalue2,
Min([T1 Net Data].Datevalue1) AS MinOfDatevalue1,
Min(OAUSER_SALESMAN.CLASS_CODE) AS MinOfCLASS_CODE
FROM [T1 Net Data] LEFT JOIN OAUSER_SALESMAN ON [T1 Net Data].Salesman_Number = OAUSER_SALESMAN.SALESMAN_NUMBER
GROUP BY [T1 Net Data].INVOICE_NUMBER
HAVING
(((Min([T1 Net Data].CUSTOMER_NUMBER))not Like "S*"
AND
((Max([T1 Net Data].Datevalue2))>=#1/1/2002# And (Max([T1 Net Data].Datevalue2))<#1/1/2003#));
------------------------------------------------------------
My problem is when I try to add another criteria to filter out: not like "S*" or not like "L*" (When I do it ignores both criteria)
Thanks!