Home End User

Too many ends in Query Designer Search Criteria

edited December 2012 in End User
Hi

Env 14.07 with Delphi XE

In the Query Designer I have been adding Parenthesis around certain
selection criteria.

I then came to delete the begin/end using the option remove parenthesis.

This removed the begin but left the end, so I now have 2 redundant 'end'
lines in the selection criteria but with no way of removing them.

My starting point was

WHERE ( JOB_ASSISTANT.ISCURRENT = 'Y' )
AND ((( JOB_ASSISTANT.RESOURCEID = 27 )
AND ( JOB_ASSISTANT.SCHEDULEID = 7529 ))
OR (( JOB_ASSISTANT.RESOURCEID = 6 )
AND ( JOB_ASSISTANT.SCHEDULEID = 532 )))

For information, the resultant SQL looks like...

WHERE (( JOB_ASSISTANT.RESOURCEID = 27 )
AND ( JOB_ASSISTANT.SCHEDULEID = 7529 ))
OR (( JOB_ASSISTANT.RESOURCEID = 6 )
AND ( JOB_ASSISTANT.SCHEDULEID = 532 ))))

but as I have no way of removing the brackets without resorting to
converting the report to SQL.

The simple remove option does not work either.

Please advise.

Regards

Philip L Jackson

Comments

  • edited December 2012
    Hi Philip,

    I created a query similar to yours but was unable to recreate the
    behavior you describe. Which parentheses are you removing? Below is
    the query I created with the DBDEMOS database to test this. Please let
    me know the steps I need to take to reproduce the issue.

    WHERE ( orders.AmountPaid = 1 )
    AND ((( orders.CustNo = 1 )
    AND ( orders.OrderNo = 1 ))
    OR (( orders.AmountPaid = 1 )
    AND ( orders.ItemsTotal = 1 )))

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.