Announcement
Collapse
No announcement yet.
ODBC / SQL to AS400 - where x <> 0 ?
Collapse
X
-
Try changing trnqth > 0 to trnqth = 0 to see if you at least get the zero value records. If that works, then try: not (trnqth = 0) and see if that works.
-
ODBC / SQL to AS400 - where x <> 0 ?
Hello,
Having a bit of an issue with a where clause on my ODBC to as/400 connection (currently using a DB Tool to check syntax then I port to VBA)
Code:select CLNTTH, PAL#TH, TRDTTH, COMMTH, TRNCTH, TRTMTH, TRNQTH, USERTH, LOCNTH, WSIDTH from warhist where trdtth between 180104 and 180105 and clntth not like 'D2' AND progth in ('RDT181', 'RDT325', 'RDT781', 'RDT310') and Locnth not like '%%O'
So I added in;
Code:select CLNTTH, PAL#TH, TRDTTH, COMMTH, TRNCTH, TRTMTH, TRNQTH, USERTH, LOCNTH, WSIDTH from warhist where trdtth between 180104 and 180105 and clntth not like 'D2' AND progth in ('RDT181', 'RDT325', 'RDT781', 'RDT310') and Locnth not like '%%O' [B]and trnqth > 0[/B]
Ive tried
<> 0
!=0
- again no results.
The field is transaction quantity, so it's an integer, so not like '0' etc won't work....
Any one able to advise?
ThanksTags: None
Leave a comment: