Solved

Query Element Parens

  • 30 March 2021
  • 2 replies
  • 75 views

Badge +1

Hello community,

When creating a SQL query and creating the XML to consult through the FSM XML Poster, I have not managed to make the parens element work since the where contains and and or clauses.

how can I do?

 

Thanks.

icon

Best answer by ruben.maas 30 March 2021, 19:33

View original

This topic has been closed for comments

2 replies

Userlevel 5
Badge +13

Hi @Yonatha , 

 

See example below:

<hierarchy_select>
  <primary_table>request</primary_table>
  <attrs>
    <attr>request.request_id</attr>
    <attr>request.req_status</attr>
  </attrs>
  <from>
    <table>request</table>
  </from>
  <where>
    <data_constraint>
      <parens>
        <constraint>
          <left_operand>request.status</left_operand>
          <operator>eq</operator>
          <right_operand>HO</right_operand>
        </constraint>
        <or />
        <constraint>
          <left_operand>request.status</left_operand>
          <operator>eq</operator>
          <right_operand>CA</right_operand>
        </constraint>
      </parens>
    </data_constraint>
  </where>
</hierarchy_select>

 

-Ruben

Badge +1

Thank you @ruben.maas