Announcement

Collapse
No announcement yet.

[SOLVED] Error en grid - SQL en SC version 7.01.0003

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Error en grid - SQL en SC version 7.01.0003

    al crear un grid, se realizar una sentencia SQL: SELECT num, fecha, cantidad, precio, (cantidad*precio) AS vsubtotal FROM factura
    en la cual tenemos un campo calculado vsubtotal, al ejecutar el grid me despliega un errro, en el cual indica que (cantidad*precio) es una columna desconosida, la consulta SQL la verifque en SQL Builder del SC y funciona.... este problema no se tenía en la version 6.
    Por favor su ayuda urgente debido a que tengo un proyecto con muchas grid y campos calculados en la sentencia SQL.

    Agradeciendo su respuesta.
    Attached Files

  • #2
    Hello Carlos,

    Please translate your current issue to english. Otherwise I won't be able to understand fully the issue you are facing.

    Thanks,
    Bernhard Bernsmann

    Comment


    • #3
      to create a grid, you create a SQL statement: SELECT num, fecha, cantidad, precio, (cantidad * precio) FROM factura AS vsubtotal
      in which we have a calculated field vsubtotal, when compiling the grid ends successful, but I run the grid displays an error, which indicates that (cantidad * precio) is an unknown column, the SQL query in the SQL Builder checked SC and it works .... this problem was not with version 6.
      Please your urgent assistance because I have a project with many grid and calculated fields in the SQL statement. Please review the attached

      Comment


      • #4
        Hi Carlos,

        please write (cantidad * vsucres) as vsubt, but not '(cantidad * vsucres)' as vsubt ... (without quotes).
        Best regards: - Reinhard -

        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

        Comment


        • #5
          the original SQL statement is:
          SELECT num, fecha, year(fecha) AS vanio, month(fecha) AS vmes, mpc, mpv, (mpc*mpv) AS vsubtotal FROM facturas
          and no quotes

          I have other projects in version 6 and migrate to version 7.1, which similarly presents me the same error.
          Perform a fresh install on another computer again and I get the same error when I generate a grid with an SQL statement with calculated field.
          What I realized is that the year and month functions have no problem, I will check other MySQL functions.
          Please help I have a project where a client and grids do not work!!

          Comment


          • #6
            Originally posted by Carlos Escola View Post
            [...] which similarly presents me the same error.
            Yes, i can confirm the error. SC insert quotes around the calculated fields in the sql string ... => Bug!
            Best regards: - Reinhard -

            I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

            Comment


            • #7
              Curious that error ... I write that sql string ...

              SELECT InvoiceLineId, InvoiceId, TrackId, UnitPrice, Quantity, UnitPrice * Quantity as UnitSum from InvoiceLine
              ... and SC 7.1.003 makes the following ...

              SELECT InvoiceLineId, InvoiceId, TrackId, UnitPrice, Quantity, `(UnitPrice * Quantity)` as unitsum from InvoiceLine
              Wrong => insert quotes, unitsum must be UnitSum ...
              Best regards: - Reinhard -

              I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

              Comment


              • #8
                same thing happens when I run a query with the function ROUND
                SELECT num, fecha, year(fecha) AS vanio, month(fecha) AS vmes, mpc, mpv, ROUND(mpv, 2) AS vsubtotal FROM facturas
                ScriptCase 7.01.0003 adds quote in the calculated field ROUND(mpv, 2)

                Comment


                • #9
                  Hello,

                  Issue reported to our bugs team.

                  regards,
                  Bernhard Bernsmann

                  Comment


                  • #10
                    Dear Please indicate the estimated date to fix the problem.
                    Thanks for your reply.

                    Comment


                    • #11
                      Good afternoon,

                      I proceeded to perform the upgrade ScriptCase and this problem is solved.

                      Thanks .....

                      Comment

                      Working...
                      X