Skip to Content
avatar image
Former Member

Client Name/IP in Approval Decision Report

How to include Client name /IP in approval decision report?.I wrote this query but it output some duplicated values with all the  machine names in my domain.

SELECT USR5.ClientName,DocNum,CardCode,CardName,OWDD.OwnerID,USR5.ActionBy,WDD1.Status,OWDD.WtmCode,OWDD.Status,ODRF.DocDate,DocDueDate FROM ODRF

INNER JOIN OWDD ON ODRF.DocEntry = OWDD.DocEntry

INNER JOIN WDD1 ON OWDD.WddCode = WDD1.WddCode

INNER JOIN OUSR ON WDD1.UserID = OUSR.USERID

INNER JOIN USR5 ON OUSR.USER_CODE = USR5.UserCode

WHERE ODRF.DocDate = '20150101'

order by  DocDate

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 05, 2015 at 09:27 AM

    Hi,

    Try:

    SELECT distinct  USR5.ClientName,DocNum,CardCode,CardName,OWDD.OwnerID,USR5.ActionBy,WDD1.Status,OWDD.WtmCode,OWDD.Status,ODRF.DocDate,DocDueDate FROM ODRF
    INNER JOIN OWDD ON ODRF.DocEntry = OWDD.DocEntry

    INNER JOIN WDD1 ON OWDD.WddCode = WDD1.WddCode

    INNER JOIN OUSR ON WDD1.UserID = OUSR.USERID

    INNER JOIN USR5 ON OUSR.USER_CODE = USR5.UserCode and OUSR.USER_CODE = USR5.[ActionBy]

    where OWDD.docdate = USR5.date and ODRF.DocDate = '20150101'
    order by  DocDate

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 05, 2015 at 09:05 AM

    Hi,

    Check This

    SELECT  Distinct USR5.ClientName,USR5.ClientIP,DocNum,CardCode,CardName,OWDD.OwnerID,USR5.ActionBy,WDD1.Status,OWDD.WtmCode,OWDD.Status,ODRF.DocDate,DocDueDate FROM ODRF

    INNER JOIN OWDD ON ODRF.DocEntry = OWDD.DocEntry

    INNER JOIN WDD1 ON OWDD.WddCode = WDD1.WddCode

    INNER JOIN OUSR ON WDD1.UserID = OUSR.USERID

    INNER JOIN USR5 ON OUSR.USER_CODE = USR5.UserCode

    WHERE ODRF.DocDate = '20150101'

    order by  DocDate

    Thanks,

    Nithi

    Add comment
    10|10000 characters needed characters exceeded