SQL Query not Working

We have a Remedy Trouble ticketing system which uses slightly modified SQL queries for creating searches. I am trying to create one but it keeps erroring out saying
"Expected a logical operation at this point: position 30
(('Base/Site -' = "Fairchild") (AND (('Status' < "Closed") AND ('MAJCOM' = 'ANG')) (OR (('Status' < "Closed") AND ('Assigned Group' = "FAR-Telephone") OR ('Assigned Group' = "FAR-TransmissionSys")))))

Open in new window

LVL 1
141ANGAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
you have a ( before the AND
WHERE [Base/Site -] = 'Fairchild' 
AND ( ([Status] < 'Closed' AND [MAJCOM] = [ANG] ) 
   OR ([Status] < 'Closed' AND [Assigned Group] = 'FAR-Telephone') 
   OR ([Assigned Group] = 'FAR-TransmissionSys')
    )

Open in new window

0
 
SuperdaveCommented:
I don't know how that query system works, but if it's anything like a normal SQL query the parentheses before the AND and OR don't look right.
0
 
LowfatspreadConnect With a Mentor Commented:
which version of remedy?

remedy search syntax isn't SQL as far as i'm aware its more boolean.

 [Base/Site -] = 'Fairchild'
AND ( ([Status] < 'Closed' AND [MAJCOM] = [ANG] )
   OR ([Status] < 'Closed' AND [Assigned Group] = 'FAR-Telephone')
   OR ([Assigned Group] = 'FAR-TransmissionSys')
    )
0
 
141ANGAuthor Commented:
Here was what it turned out to be...

(('Status' < "Closed") AND ('MAJCOM' = "ANG") AND ('Affected Base/Site' = "Fairchild")) OR ((Status < "Closed") AND ('Assigned Group' = "FAR-Telephone")) OR ((Status < "Closed") AND ('Assigned Group' = "FAR-TransmissionSys"))

Open in new window

0
All Courses

From novice to tech pro — start learning today.