Skip to Content

new query for sales quotation

Hi Team,

this query is working fine. How to run this Query when?

using the last updated filed rather than the created by field{using parameter}

SELECT T1.[U_Name], count(T0.[DocNum])'Number Of Sales Quotations', sum(T0.[DocTotal] -T0.[Vatsum])'Total Document Total',sum(T0.GrosProfit)'Total GrossProfit' FROM OQUT T0 INNER JOIN OUSR T1 ON T0.[UserSign] = T1.[USERID] WHERE T0.[DocDate] between [%0] and [%1] group by t1.u_name

Add comment
10|10000 characters needed characters exceeded

  • Could you please close one of your threads?

  • Thanks Sir for help me for query i want below output.

    DECLARE @FRDATE DATE = /* SELECT FROM dbo.ADOC T0 WHERE T0.updatedate >= */ '[%0]'

    DECLARE @TODATE DATE = /* SELECT FROM dbo.ADOC T0 WHERE T0.updatedate <= */ '[%1]'

    Select A.U_NAME, A.[Number Of Sales Quotations],

    A.[Total Document Total], A.[Total GrossProfit],

    A.[Updated Date] 'Last Updated Date' from(SELECT T1.[U_Name],

    (select top 1 A.UpdateDate from ADOC A where A.Docentry = T0.DocEntry and A.ObjType = 23 ORDER BY A.UpdateDate DESC,UpdateTS DESC)'Updated Date', count(T0.[DocNum])'Number Of Sales Quotations', sum(T0.[DocTotal] -T0.[Vatsum])'Total Document Total', sum(T0.GrosProfit)'Total GrossProfit' FROM OQUT

    T0 INNER JOIN OUSR T1 ON T0.[UserSign] = T1.[USERID]

    group by t1.u_name,T0.DocEntry)

    A where a.[Updated Date] between @FRDATE and @TODATE

  • Get RSS Feed

0 Answers