Skip to Content

User Query - DocEntry

Hello,

I made such query:

SELECT T1.[DocEntry] , T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]   FROM ORDR T0 <br>INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T0.[DocDate]  <= GETDATE()  -5 and T0.DocStatus='O'

works good, but one thing I would like to improove

Now the query returns for each article/item in RDR1 own row, so when some Order has 3 articles in result I see 3 rows for this order. Is somehow possible to I could get for one Order one just row/record.

I know that what I need do such query:

SELECT  T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]   FROM ORDR T0  
 WHERE T0.[DocDate]  <= GETDATE()  -5 and T0.DocStatus='O'

but here is a problem, that in result are not yellow arrows, so I cannot enter to the document. It was the reason why I have used the query above with the DocEntry what help me to display 'yellow arrow'.

Thank You

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 07, 2017 at 05:19 PM

    SOLVED:

    SELECT T0.[DocEntry] , T0.[DocNum], T0.[DocDate], T0.[CardName], T0.[DocStatus]

    FROM ORDR T0

    WHERE T0.[DocDate] <= GETDATE() -5 and T0.DocStatus='O'

    Add comment
    10|10000 characters needed characters exceeded