We help IT Professionals succeed at work.

SQL Formula Error

Gordon Hughes
on
I have created the following, but it says there is a ) missing, cannot see how to fix this

({WOEQLIST.LOCATION} = {?Pm-?Factory}) and
(({WOEQLIST.UD3} = "Yes") or
({WO.WOTYPE} = 'WRF' and {WOEQLIST.UD3} is not 'Resolved'))

Gordon
Comment
Watch Question

try like below

(({WOEQLIST.LOCATION} = {?Pm-?Factory}) and
(({WOEQLIST.UD3} = "Yes") or
({WO.WOTYPE} = 'WRF' and {WOEQLIST.UD3} is not 'Resolved')))
Gordon HughesDirector

Author

Commented:
Hi

It still says the ) is missing

Gordon
Top Expert 2011

Commented:
({WOEQLIST.LOCATION} = {?Pm-?Factory}) and
(({WOEQLIST.UD3} = "Yes") or
(({WO.WOTYPE} = 'WRF') and ({WOEQLIST.UD3} is not 'Resolved')))
Gordon HughesDirector

Author

Commented:
Hi

Still says missing )
I am trying to use this as a record selection forula, if this makes any difference
Director
Commented:
Found there was a null field causing issues so have changed the formula and now I can get the correct data
Thanks for all input
Gordon HughesDirector

Author

Commented:
Done a work around
FWIW, the problem with your original formula was "is not".  Those are both recognized keywords, individually, but "is not" is not a valid test.  That should have been {WOEQLIST.UD3} <> 'Resolved'.

 James