Results 1 to 2 of 2

Thread: Duplicate Row Results

  1. #1
    Join Date
    Aug 2017
    Posts
    2

    Duplicate Row Results

    I am getting duplicate rows, not on every record but on about 5 but one of them is about 500%

    SELECT DISTINCT
    I.INVOICE_NUMBER AS "INVOICE_NUMBER" (this value can only be found here)
    , V.VENDOR_ID AS "PAYEE ID"
    , ILI.INVOICE_ID AS "INVOICE ID"
    , V.VENDOR_OFFICIAL_NAME AS "PAYEE NAME" this value can only be found here
    , I.INVOICE_DT AS "INVOICE DATE"
    , C.CHECK_NUMBER AS "CHECK NUMBER"
    , C.CHECK_PAYMENT_TYPE AS "PAYMENT TYPE"
    , C.CHECK_DT AS "CHECK DATE"
    , C.CHECK_STATUS AS "CHECK STATUS"
    , ILI.INVOICE_LN_ITM_DESC AS "INVOICE DESC" this value can only be found here
    , ANS.ACCT_NUM_STRING AS "ACCT NUMBER STRING"
    , ANS.BUDGET_OWNER_CODE AS "BUDGET OWNER"
    , C.CHECK_PAYMENT_AMT AS "AMOUNT"
    , I.INVOICE_SOURCE_DOCUMENT AS "INVOICE TYPE"
    , I.INVOICE_SOURCE_DOCUMENT_ID AS "DOC ID"
    FROM TEAMS.INVOICE I
    INNER JOIN TEAMS.INVOICE_LINE_ITEM_ACCOUNT ILIA ON I.INVOICE_ID = ILIA.INVOICE_ID
    INNER JOIN TEAMS.ACCOUNT_NUMBER_FY_STRING ANS ON ILIA.ACCT_NUM_INTERNAL_ID = ANS.ACCT_NUM_INTERNAL_ID
    INNER JOIN TEAMS.INVOICE_LINE_ITEM ILI ON ILIA.INVOICE_ID = ILI.INVOICE_ID AND ILI.INVOICE_LN_ITM_TOTAL_PRICE <> 0
    INNER JOIN TEAMS.INVOICE_CHECK IC ON ILIA.INVOICE_ID = IC.INVOICE_ID
    INNER JOIN TEAMS.TEAMS_CHECK C ON IC.CHECK_ID = C.CHECK_ID
    INNER JOIN TEAMS.VENDORRR V on I.COMPANY_ID = v.COMPANY_ID
    WHERE C.CHECK_DT = '2017-07-13 00:00:00' and ANS.ACCT_NUM_DEF_FISCAL_YEAR ='2018' AND I.INVOICE_SOURCE_DOCUMENT <> 'Payroll Disbursement'

  2. #2
    Join Date
    Aug 2017
    Posts
    2

    Any suggestions on how to stop

    Any suggestions on what to do?


    Quote Originally Posted by reneebjames View Post
    I am getting duplicate rows, not on every record but on about 5 but one of them is about 500%

    SELECT DISTINCT
    I.INVOICE_NUMBER AS "INVOICE_NUMBER" (this value can only be found here)
    , V.VENDOR_ID AS "PAYEE ID"
    , ILI.INVOICE_ID AS "INVOICE ID"
    , V.VENDOR_OFFICIAL_NAME AS "PAYEE NAME" this value can only be found here
    , I.INVOICE_DT AS "INVOICE DATE"
    , C.CHECK_NUMBER AS "CHECK NUMBER"
    , C.CHECK_PAYMENT_TYPE AS "PAYMENT TYPE"
    , C.CHECK_DT AS "CHECK DATE"
    , C.CHECK_STATUS AS "CHECK STATUS"
    , ILI.INVOICE_LN_ITM_DESC AS "INVOICE DESC" this value can only be found here
    , ANS.ACCT_NUM_STRING AS "ACCT NUMBER STRING"
    , ANS.BUDGET_OWNER_CODE AS "BUDGET OWNER"
    , C.CHECK_PAYMENT_AMT AS "AMOUNT"
    , I.INVOICE_SOURCE_DOCUMENT AS "INVOICE TYPE"
    , I.INVOICE_SOURCE_DOCUMENT_ID AS "DOC ID"
    FROM TEAMS.INVOICE I
    INNER JOIN TEAMS.INVOICE_LINE_ITEM_ACCOUNT ILIA ON I.INVOICE_ID = ILIA.INVOICE_ID
    INNER JOIN TEAMS.ACCOUNT_NUMBER_FY_STRING ANS ON ILIA.ACCT_NUM_INTERNAL_ID = ANS.ACCT_NUM_INTERNAL_ID
    INNER JOIN TEAMS.INVOICE_LINE_ITEM ILI ON ILIA.INVOICE_ID = ILI.INVOICE_ID AND ILI.INVOICE_LN_ITM_TOTAL_PRICE <> 0
    INNER JOIN TEAMS.INVOICE_CHECK IC ON ILIA.INVOICE_ID = IC.INVOICE_ID
    INNER JOIN TEAMS.TEAMS_CHECK C ON IC.CHECK_ID = C.CHECK_ID
    INNER JOIN TEAMS.VENDORRR V on I.COMPANY_ID = v.COMPANY_ID
    WHERE C.CHECK_DT = '2017-07-13 00:00:00' and ANS.ACCT_NUM_DEF_FISCAL_YEAR ='2018' AND I.INVOICE_SOURCE_DOCUMENT <> 'Payroll Disbursement'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •