Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Where Priority

forums forums SQLyog Query Builder and Schema Designer Where Priority

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #13393
      Giu
      Member

      Hi

       

      I’m evaluting SQLYog, and I did my first query on Query builder, but I don’t understand how priotity works.

       

      I need a WHERE like this


      WHERE ((((`kogest`.`documentocomercial`.`DTYPE` = 'AlbaranDeVenta')
      AND ISNULL(`kogest`.`documentocomercial`.`facturado_en`))
      OR ((`kogest`.`documentocomercial`.`DTYPE` = 'FacturaDeVenta')
      AND ISNULL(`kogest`.`documentocomercial`.`abonado_en`)))
      AND (`kogest`.`seriedocumento`.`notas` = 0)
      AND (`kogest`.`detalledocumento`.`totalLinea` > 0)));

      As you can see in attached screenshots, I used it as I think it’s suppose to be. I mean, for the field with creteria and OR, should be solved together, but query builder does:


      WHERE (`detalledocumento`.`totalLinea` >0
      AND `documentocomercial`.`DTYPE` = 'AlbaranDeVenta' AND ISNULL(`facturado_en`)
      AND `seriedocumento`.`notas` =0)
      OR (`documentocomercial`.`DTYPE` = 'FacturaDeVenta')
      AND ISNULL(`documentocomercial`.`abonado_en`));

      It doesn’t apply any kind of priority. Is this the normal behaviour? or something I’m doing wrong?

       

      EDITED..to clarify, field DTYPE should be

      (DTYPE=’AlbaranDeVenta’ AND ISNULL(`facturado_en`)) OR (DTYPE = ‘FacturaDeVenta’ AND ISNULL(`documentocomercial`.`abonado_en`))

      I want this to be solved entirely as one block of WHERE clause

    • #35441
      peterlaursen
      Participant

      I don’t understand the term “priority” in this context.  

       

      Anyway did you read the documentation at the Query Builder? 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.