Skip to Content
author's profile photo Former Member
Former Member

Query en alarma

Buenas tardes,

se ha creado una alarma con el siguiente query pero no funciona, si se ejecuta la consulta aparte si devuelve resultados, pero la alarma no funciona que problema hay?

SELECT T0.DocNum as Factura,T0.DocDate as Fecha, T0.DocDueDate as Vence, T0.CardCode as Codigo, T0.CardName as Nombre, Sum(T1.LineTotal) as Subtotal, T0.DiscSum as Descuento, T0.VatSum as IVA, T0.WTSum as Retencion, T0.DocTotal as Total_Dcto, T0.PaidToDate as Pagado_Abonado, (T0.DocTotal- T0.PaidToDate) as Saldo_Total FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE CONVERT(VARCHAR(10),T0.DOCDATE,112)=CONVERT(VARCHAR(10),GETDATE(),112) and T0.DocStatus <> 'C' GROUP BY T0.DocNum,T0.DocDate, T0.DocDueDate, T0.CardCode, T0.CardName, T0.DiscSum, T0.VatSum , T0.WTSum, T0.DocTotal, T0.PaidToDate, (T0.DocTotal- T0.PaidToDate) ORDER BY T0.DocNum

Gracias por la ayuda,

Juan Camilo Arias J.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 10:24 PM

    Juan Buenas tardes,

    En la nota 629479 de SAP aparece la explicación a este incidente. Este dice que las Queries con alarmas no se pueden utilizar expresiones con parentesis.

    La revisión de esta nota te será útil.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 10:14 PM

    Me resulto este error,

    Msg 102, Level 15, State 1, Line 1

    Sintaxis incorrecta cerca de 'C'.

    en el where debe ser = 'C'.

    Debes revisar a quienes se les envia la alarma, donde la envia y cadacuanto se ejecuta.

    att,

    Manuel Lazcano

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2008 at 10:16 PM

    Estimado,

    Posiblemente tu problema esté en la alarma y alli debes asegurarte que:

    -. la alarma estuviera activa

    -. prueba enviando la alarma al correo interno y no a casilla de mail, pues asi ves si el error tal vez este en el servicio de mail.

    -. otro parametro a revisar es UPDATE MESSAGE de la pestaña de SERVICE en los GENERAL SETTINGS.

    saludos

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 03:17 PM

    Estimado Juan

    He visto tu query y me he fijado al lado de la expresión DOCSTATUS falta el signo igual, en la penúltima fila.

    corrige ese problema y quizás soluciones tu problema.

    Quedaría

    T0.DocStatus = 'C' GROUP BY T0.DocNum,T0.DocDate, T0.DocDueDate, T0.CardCode, T0.CardName, T0.DiscSum, T0.VatSum , T0.WTSum, T0.DocTotal, T0.PaidToDate, (T0.DocTotal- T0.PaidToDate) ORDER BY T0.DocNum

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.