Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query "not" statements ignored. 1

Status
Not open for further replies.

Pharmer

Technical User
Aug 15, 2002
13
US
I am running this query:
Code:
Query
ANSWER: :PRIV:ANSWER.DB

T_Data_0507_ASC.DB | ID         | Station                             | 
                   | CALC COUNT | Check CALC OPEN as PHARMACY HOURS   | 
                   | CALC COUNT | Check CALC CLOSED as PHARMACY HOURS | 
                   | CALC COUNT | Check CALC CLOSED as PHARMACY HOURS | 
                   | CALC COUNT | Check CALC OPEN as PHARMACY HOURS   | 

T_Data_0507_ASC.DB | TxTime                  | TxSeq                 | 
                   | >= 07:00:00, < 15:15:15 | CALC "05_07" AS MONTH | 
                   | >= 00:00:00, < 07:00:00 | CALC "05_07" AS MONTH | 
                   | > 22:59:59              | CALC "05_07" AS MONTH | 
                   | >= 15:15:15, < 23:00:00 | CALC "05_07" AS MONTH | 

T_Data_0507_ASC.DB | PaType             | 
                   | CALC DAY AS SHIFT  | 
                   | CALC NITE AS SHIFT | 
                   | CALC NITE AS SHIFT | 
                   | CALC EVE AS SHIFT  | 

T_Data_0507_ASC.DB | MedID                                                                                     | 
                   | NOT 1628 OR 1629 OR 1500 OR 1508 OR 1641 OR 1994 OR 1993 OR 1924 OR 1873 OR 1662 OR 999.. | 
                   | NOT 1628 OR 1629 OR 1500 OR 1508 OR 1641 OR 1994 OR 1993 OR 1924 OR 1873 OR 1662 OR 999.. | 
                   | NOT 1628 OR 1629 OR 1500 OR 1508 OR 1641 OR 1994 OR 1993 OR 1924 OR 1873 OR 1662 OR 999.. | 
                   | NOT 1628 OR 1629 OR 1500 OR 1508 OR 1641 OR 1994 OR 1993 OR 1924 OR 1873 OR 1662 OR 999.. | 

T_Data_0507_ASC.DB | OrderID | 
                   | OVER..  | 
                   | OVER..  | 
                   | OVER..  | 
                   | OVER..  | 

EndQuery
Results yield MEDID # 1993, 1994, 1873 (disregarding "NOT" statement in query). Is there upper limit of "not" statement allowed (this one has 11). Or is there a better way?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top