3 Replies Latest reply: Oct 11, 2017 10:51 AM by Michael Venable RSS

    Link Table Script is not working.  Please help.

    Michael Venable

      I am trying to create a link table useing the folloiwng script and I keep getting an error message saying i need to correct the error however no detail in the error type is noted.  (Background the data size is about 300 GBs if that might be causing the issue).  Any help would be very much appreciated.

       

      LOAD

          COMPANYID&'_'&HRCOMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PROCESS_LEVEL&'_'&EMPLOYEEID AS EmpKey,

          EM_MCMID,

      //     HRCOMPANYID,

      //     EMPLOYEEID,

          EM_LastName,

          EM_FirstName,

          EM_MiddleInitial,

          EM_MiddleName,

          EM_EmployeeAddress,

          EM_EmployeeCity,

          EM_State,

          EM_Zip,

          EM_SSN,

      //   COST_CENTER,

          EM_Title,

      //    PROCESS_LEVEL,

      //    DEPARTMENT,

          EM_UserLevel,

      //    COMPANYID,

          EM_GLAccount,

          EM_GLSubAccount,

          EM_JobCode,

          EM_UnionCode,

          EM_HireDate,

          EM_PayFrequency,

          EM_Shift,

          EM_SalaryClass,

          EM_ExemptCode,

          EM_PayRate,

          EM_StandardHours,

          EM_StandardAmount,

          EM_EmployeeBankAccountInformation,

          EM_EmployeeApprovalThreshold,

          EM_Supervisor,

          EM_TABLE,

          EM_MCMID_MgmtThrshlds,

          EM_LOWERLIMIT,

          EM_UPPERLIMIT

      FROM [lib://Visualization_Inputs/EMPLOYEE MASTER2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD DISTINCT

          COMPANYID&'_'&HRCOMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PROCESS_LEVEL&'_'&EMPLOYEEID AS EmpKey,

          COMPANYID,

          HRCOMPANYID,

          DEPARTMENT,

          COST_CENTER,

          PROCESS_LEVEL,

          EMPLOYEEID

      FROM [lib://Visualization_Inputs/EMPLOYEE MASTER2.qvx]

      (qvx);

       

       

       

       

       

      LOAD

      COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PAYVENDORID&'_'&VENDORID&'_'&INVOICE_NO&'_'&CHECK_NO AS InvKey,

          INV_MCMID,

          INV_SUFFIX,

          "INV_CANCEL-SEQ",

          INV_CANCELDATE,

          INV_BATCHNUMBER,

          INV_BATCHDATE,

          INV_AUTHORIZATIONCODE,

          INV_INVOICETYPE,

          INV_PORELEASENUMBER,

      //     COST_CENTER,

          "INV_BUSINESSUNIT/COSTCENTER",

      //     DEPARTMENT,

          INV_DUEDATE,

          INV_DISCOUNTRATE,

      //     COMPANYID,

          INV_InvoiceCreationDate,

      //     INVOICE_NO,

          INV_INVOICEDATE,

      //     PAYVENDORID,

          INV_REMITTOLOCATION,

          INV_INVOICEAMOUNT,

          INV_INV_AMT_CURRENCY,

      //     VENDORID,

          INV_DISCOUNTCODE,

          INV_TABLE,

          INV_Open_AP_DAYS_TILL_DUE,

          INV_OPEN_AP_BUCKET,

          INV_DAYS_PAST_DUE,

          INV_DAYS_PAST_DUE_BUCKET,

      //     CHECK_NO,

          INV_First_CHECK_DATE,

          "INV_Invoice Age",

          "INV_Invoice Age Bucket SortOrder",

          "INV_Invoice Age Bucket",

          "INV_Approver Type",

          "INV_Approver Level",

          "INV_Approver Name",

          INV_Appvr_MCMID_EmpMast,

          INV_Appvr_Title,

          INV_Amount_Bin,

          "INV_Lowest Approver Level",

          "INV_Approval Level No",

          "INV_Approval Level Calc",

          INV_Invoice_Entry_Delay,

          "INV_Invoice Std Devs"

      FROM [lib://Visualization_Inputs/INVOICE2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD DISTINCT

      COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PAYVENDORID&'_'&VENDORID&'_'&INVOICE_NO&'_'&CHECK_NO AS InvKey,

          COMPANYID,

          DEPARTMENT,

          COST_CENTER,

          PAYVENDORID,

          VENDORID,

          INVOICE_NO,

          CHECK_NO

      FROM [lib://Visualization_Inputs/INVOICE2.qvx]

      (qvx);

       

       

      LOAD

      HRCOMPANYID&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

      //    ORG_MCMID,

      //    HRCOMPANYID,

      //    COMPANYID,

          "ORG_Short Description",

          ORG_Description,

      //    DEPARTMENT,

          "ORG_Unit Type",

          "ORG_General Unit Classification",

          "ORG_General Annual Hours Per Employee",

          "ORG_Location Code",

          "ORG_Cost Center Mapping for GL Accounting",

      //    COST_CENTER,

          ORG_TABLE

      FROM [lib://Visualization_Inputs/ORGANIZATION MASTER2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD Distinct

      HRCOMPANYID&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

          HRCOMPANYID,

          COMPANYID,

          DEPARTMENT,

          COST_CENTER

      FROM [lib://Visualization_Inputs/ORGANIZATION MASTER2.qvx]

      (qvx);

       

       

      LOAD

          COMPANYID&'_'&INVOICE_NO&'_'&PAYVENDORID&'_'&VENDORID&'_'&CHECK_NO&'_'&EMPLOYEEID as PmtKey,

          PMT_MCMID,

          PMT_BATCHID,

          PMT_DUEDATE,

          PMT_DISCOUNTAPPLIED,

          PMT_PAYVOUCHERID,

          PMT_DISTRIBUTION_DATE,

      //    COMPANYD,

      //    INVOICE_NO,

      //    PAYVENDORID,

          PMT_RECORDSTATUS,

          PMT_REMITTOLOCATION,

          PMT_PAYMENTAMOUNT,

      //    VENDORID,

          PMT_VOIDATE,

      //    EMPLOYEEID,

          PMT_CANCEL_SEQ,

          PMT_VOID_SEQ,

          PMT_VOID_DATE,

      //    CHECK_NO,

          PMT_CHECK_DATE,

          PMT_CHKDT_YR,

          PMT_CHKDT_M,

          PMT_CHKDT_MM,

          PMT_CHKDT_DY,

          PMT_CHKDT_WD,

          PMT_CHKDT_WDSort,

          PMT_TABLE,

          PMT_ABS_PMNT_AMNT,

          PMT_MCM_BFD_CHKID,

          PMT_CHK_Line_ITem_Total,

          PMT_Offset_MatchKey,

          "PMT_Payment Amount Bucket SortOrder",

          "PMT_Payment Amount Bucket"

      FROM [lib://Visualization_Inputs/PAYMENTS2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD Distinct

          COMPANYID&'_'&INVOICE_NO&'_'&PAYVENDORID&'_'&VENDORID&'_'&CHECK_NO&'_'&EMPLOYEEID as PmtKey,

      COMPANYID,

          INVOICE_NO,

          PAYVENDORID,

          VENDORID,

          CHECK_NO,

          EMPLOYEEID

      FROM [lib://Visualization_Inputs/PAYMENTS2.qvx]

      (qvx);

       

       

      LOAD

      PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&DEPARTMENT AS POLineKey,

          PO.LI_MCMID,

      //    PO_NUMBER,

      //    COMPANYID,

          PO.LI_Location,

          "PO.LI_PO-Release",

      //    PO_CODE,

      //    PO_LINE_NUMBER,

      //    ITEM_NO,

          PO.LI_ItemType,

          PO.LI_Description,

          PO.LI_LineItemDescription,

          PO.LI_Quantity,

          PO.LI_UOM,

          PO.LI_EntUnitCost,

          PO.LI_UnitCostCode,

          PO.LI_SubmitterID,

          PO.LI_Status,

          PO.LI_ClosedDate,

      //    VENDORID,

          PO.LI_VendorItem,

      //    RECEIPTID,

          PO.LI_TABLE,

      //    INVOICE_NO,

          PO.LI_PO_RELEASE,

          PO.LI_SUFFIX,

          PO.LI_INV_LOCATION,

          PO.LI_INVOICE_TYPE,

      //    DEPARTMENT,

          PO.LI_BusinessUnit,

          PO.LI_CancelledFlag,

          PO.LI_PODT_YR,

          PO.LI_PODT_M,

          PO.LI_PODT_MM,

          PO.LI_PODT_DY,

          PO.LI_PODT_WD,

          PO.LI_PODT_WDSort,

          PO.LI_AcctUnit,

          PO.LI_ACCTUNITDESC,

          PO.LI_ACCOUNT,

          PO.LI_ACCOUNTDESC,

          PO.LI_SUBACCT,

          PO.LI_REQLINENBR,

          PO.LI_PO_DATE,

          "PO.LI_Total Quant Ordered on Date",

          "PO.LI_Sample Size",

          "PO.LI_Item GroupingKey",

          "PO.LI_Date Rank Assending",

          PO.LI_Days_Elapsed,

          "PO.LI_Sample Size Reliability",

          PO.LI_Avg_Days_Elapsed,

          PO.LI_StdDev_Days_Elapsed,

          "PO.LI_No of Std Devs Days",

          "PO.LI_No of Different Vendors",

          PO.LI_MultiVendorItem_MatchKey,

          "PO.LI_Multi Item Sort",

          "PO.LI_Per Unit Price",

          "PO.LI_Per ItemAvg_Per Unit Price",

          "PO.LI_Per Item StdDev_Per Unit Price",

          "PO.LI_Per Vendor Avg_Per Unit Price",

          "PO.LI_Per Vendor StdDev_Per Unit Price",

          "PO.LI_Per Unit $ Diff (per vendor)",

          "PO.LI_Std Devs (+/-) (per vendor)",

          "PO.LI_Per Unit $ Diff (per item)",

          "PO.LI_Std Devs (+/-) (per item)",

          "PO.LI_Std Devs"

      FROM [lib://Visualization_Inputs/PO LINE ITEM2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD DISTINCT

      PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&DEPARTMENT AS POLineKey,

      PO_NUMBER,

          COMPANYID,

          PO_CODE,

          PO_LINE_NUMBER,

          ITEM_NO,

          VENDORID,

          RECEIPTID,

          INVOICE_NO,

          DEPARTMENT

      FROM [lib://Visualization_Inputs/PO LINE ITEM2.qvx]

      (qvx);

       

       

      LOAD

      COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          PO.Mtr_MCMID,

          PO.Mtr_BuyerCode,

          PO.Mtr_CancelledFlag,

          PO.Mtr_ClosedFlag,

      //    COMPANYID,

          PO.Mtr_CurrencyCode,

      //    PO_CODE,

          PO.Mtr_PODate,

      //    PO_NUMBER,

          PO.Mtr_POObjID,

          PO.Mtr_POReleaseNum,

          PO.Mtr_PurchaseFromLocationCode,

          PO.Mtr_ReleasedFlag,

          PO.Mtr_ShipmentToArriveDate,

          PO.Mtr_TotalPurchaseOrderAmount,

          PO.Mtr_PurchaseOrderProductAmount,

          PO.Mtr_User,

          PO.Mtr_Vendor,

      //    VENDORID,

          PO.Mtr_TABLE,

      //    INVOICE_NO,

          PO.Mtr_PO_RELEASE,

          PO.Mtr_INV_VENDOR,

          PO.Mtr_SUFFIX,

          PO.Mtr_LOCATION,

          PO.Mtr_INVOICE_TYPE,

          "PO.Mtr_Days From PO to 1st Invoice"

      FROM [lib://Visualization_Inputs/PO MASTER2.qvx]

      (qvx);

       

       

      LINKTABLE:

      LOAD Distinct

      COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID,

          PO_CODE,

          PO_NUMBER,

          VENDORID,

          INVOICE_NO

      FROM [lib://Visualization_Inputs/PO MASTER2.qvx]

      (qvx);

       

       

       

       

      LOAD

      COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&ITEM_NO&'_'&INVOICE_NO AS RecKey,

          MCMID_Receiving,

      //    COMPANYID,

          REC_NUMBER,

      //    LINE_NBR,

      //    PO_NUMBER,

          PO_RELEASE,

      //    PO_CODE,

          PO_LINE_NUMBER,

          R_STATUS,

      //    VENDORID,

      //    ITEM_NO,

          ENT_REC_QTY,

          ENT_REC_UOM,

          ENT_RUOM_MULT,

          REJECT_QTY,

          ORIG_REC_QTY,

          REC_DATE,

          VPRI_QUANTITY,

          VPRI_UOM,

          VPRI_UOM_MULT,

          BUOM_QTY,

          VBUY_UOM,

          VBUY_UOM_MULT,

          SUFFIX,

      //    INVOICE_NO,

          ITEM_TYPE,

          "TABLE",

          Quant._Rec2Req,

          Ext.Quant_Rec2Req,

          Quant_Rec2PO.Inv,

          Ext.Quant_Rec2PO.Inv,

          UOM_Variance

      FROM [lib://Visualization_Inputs/Receiving2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&ITEM_NO&'_'&INVOICE_NO AS RecKey,

          COMPANYID,

          PO_NUMBER,

          PO_CODE,

          PO_LINE_NUMBER,

          VENDORID,

          ITEM_NO,

          INVOICE_NO

      FROM [lib://Visualization_Inputs/Receiving2.qvx]

      (qvx);

       

       

      LOAD

      COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&COST_CENTER AS ReqKey,

          RQ_MCMID,

      //    COMPANYID,

          RQ_COMPANY,

          RQ_REQLOCATION,

          RQ_REQNUMBER,

          RQ_REQUESTER,

          RQ_CREATIONDATE,

          RQ_REFERENCENO,

          RQ_DESCRIPTION,

      //    ITEM_NO,

          RQ_ITEMTYPE,

          RQ_ITEMGROUP,

          RQ_ITEMDESCRIPTION,

      //    VENDORID,

          RQ_LINEITEM,

          RQ_STATUS,

          RQ_POUSER,

          RQ_DELETEDATE,

          RQ_RETURNDATE,

          RQ_REJECTEDDATE,

          RQ_RELEASEDDATE,

          RQ_APPROVALDATE,

          RQ_SUBMITTERID,

          RQ_APPROVEDFLAG,

          RQ_APPROVALCODE,

          RQ_ATTAINLEVEL,

          RQ_APPROVALLEVEL,

          RQ_CLOSEDLINES,

          RQ_NUMBERLINES,

          RQ_CLOSEDFLAG,

          RQ_ITOTAL,

          RQ_NTOTAL,

          "RQ_X-STOTAL",

          RQ_REQUISITIONTOTAL,

          RQ_QUOTEFLAG,

          RQ_OPERATORID,

          RQ_BUYERCODE,

      //    PO_NUMBER,

      //    COST_CENTER,

          RQ_TABLE,

          RQ_MCMID_REQAcctgUnitID,

          RQ_DIST_COMPANY,

          RQ_DIST_DESCRIPTION,

          RQ_RQApvr_APPROVE_CD,

          RQ_RQApvr_DESCRIPTION,

          RQ_RQApvr_SKIP_LVLS_FL,

          RQ_RQApvr_AUTH_PRT_FL,

          RQ_RQApvr_AUTH_ID_01,

          RQ_RQApvr_AUTH_ID_02,

          RQ_RQApvr_AUTH_ID_03,

          RQ_RQApvr_AUTH_ID_04,

          RQ_RQApvr_AUTH_ID_05,

          RQ_RQApvr_AUTH_ID_06,

          RQ_RQApvr_AUTH_NAME_01,

          RQ_RQApvr_AUTH_NAME_02,

          RQ_RQApvr_AUTH_NAME_03,

          RQ_RQApvr_AUTH_NAME_04,

          RQ_RQApvr_AUTH_NAME_05,

          RQ_RQApvr_AUTH_NAME_06,

          RQ_RQApvr_AUTH_LIMIT_01,

          RQ_RQApvr_AUTH_LIMIT_02,

          RQ_RQApvr_AUTH_LIMIT_03,

          RQ_RQApvr_AUTH_LIMIT_04,

          RQ_RQApvr_AUTH_LIMIT_05,

          RQ_RQApvr_AUTH_LIMIT_06,

          RQ_UOM_Variance

      FROM [lib://Visualization_Inputs/Requisition2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&COST_CENTER AS ReqKey,

      COMPANYID,

          ITEM_NO,

          VENDORID,

          PO_NUMBER,

          COST_CENTER

      FROM [lib://Visualization_Inputs/Requisition2.qvx]

      (qvx);

       

       

       

       

       

       

      // LINKTABLE:

      // Load Distinct

      // COMPANYID&'_'&HRCOMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PROCESS_LEVEL&'_'&EMPLOYEEID AS EmpKey,

      // COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PAYVENDORID&'_'&VENDORID&'_'&INVOICE_NO&'_'&CHECK_NO AS InvKey,

      //     HRCOMPANYID&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

      //     COMPANYID&'_'&INVOICE_NO&'_'&PAYVENDORID&'_'&VENDORID&'_'&CHECK_NO&'_'&EMPLOYEEID as PmtKey,

      //     PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&DEPARTMENT AS POLineKey,

      //     COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

      //     COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&ITEM_NO&'_'&INVOICE_NO AS RecKey,

      //     COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&COST_CENTER AS ReqKey,

       

       

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&HRCOMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PROCESS_LEVEL&'_'&EMPLOYEEID AS EmpKey,

        COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS InvKey,

          HRCOMPANYID&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&EMPLOYEEID as PmtKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&RECEIPTID&'_'&Null ()&'_'&DEPARTMENT AS POLineKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS POMastKey,

      COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS RecKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&COST_CENTER AS ReqKey,

      Null () as PAYVENDORID,

      Null () as VENDORID,

          Null () as INVOICE_NO,

          NULL () AS CHECK_NO,

          NULL () AS PO_NUMBER,

          NULL () AS PO_CODE,

          NULL () AS PO_LINE_NUMBER,

          NULL () AS ITEM_NO,

          COMPANYID,

          HRCOMPANYID,

          DEPARTMENT,

          COST_CENTER,

          PROCESS_LEVEL,

          EMPLOYEEID

      FROM [lib://Visualization_Inputs/EMPLOYEE MASTER2.qvx]

      (qvx);

         

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&Null ()&'_'&Null () AS EmpKey,

        COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&PAYVENDORID&'_'&VENDORID&'_'&INVOICE_NO&'_'&CHECK_NO AS InvKey,

          Null ()&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

          COMPANYID&'_'&INVOICE_NO&'_'&PAYVENDORID&'_'&VENDORID&'_'&CHECK_NO&'_'&Null () as PmtKey,

          Null ()&'_'&COMPANYID&'_'&PO_CODE&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&INVOICE_NO&'_'&DEPARTMENT AS POLineKey,

          COMPANYID&'_'&PO_CODE&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO AS RecKey,

          COMPANYID&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&COST_CENTER AS ReqKey,

          Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as HRCOMPANYID,

          Null () as PO_NUMBER,

          Null () as PO_LINE_NUMBER,

          Null () as ITEM_NO,

          Null () as RECEIPTID,

          COMPANYID,

          DEPARTMENT,

          COST_CENTER,

          PAYVENDORID,

          VENDORID,

          INVOICE_NO,

          CHECK_NO

      FROM [lib://Visualization_Inputs/INVOICE2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

        COMPANYID&'_'&HRCOMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&Null ()&'_'&Null () AS EmpKey,

        COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS InvKey,

          HRCOMPANYID&'_'&COMPANYID&'_'&DEPARTMENT&'_'&COST_CENTER AS OrgKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () as PmtKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&DEPARTMENT AS POLineKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS POMastKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS RecKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&COST_CENTER AS ReqKey,

      Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as INVOICE_NO,

          Null () as PO_NUMBER,

          Null () as PO_LINE_NUMBER,

          Null () as ITEM_NO,

          Null () as RECEIPTID,

          Null () as VENDORID,

          Null () as PAYVENDORID,

          Null () as PO_CODE,

          Null () as CHECK_NO,

      HRCOMPANYID,

          COMPANYID,

          DEPARTMENT,

          COST_CENTER

      FROM [lib://Visualization_Inputs/ORGANIZATION MASTER2.qvx]

      (qvx);

         

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&EMPLOYEEID AS EmpKey,

        COMPANYID&'_'&Null ()&'_'&Null ()&'_'&PAYVENDORID&'_'&VENDORID&'_'&INVOICE_NO&'_'&CHECK_NO AS InvKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null () AS OrgKey,

          COMPANYID&'_'&INVOICE_NO&'_'&PAYVENDORID&'_'&VENDORID&'_'&CHECK_NO&'_'&EMPLOYEEID as PmtKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&INVOICE_NO&'_'&Null () AS POLineKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&Null () &'_'&INVOICE_NO AS RecKey,

          COMPANYID&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&COST_CENTER AS ReqKey,   

          Null () as PROCESS_LEVEL,

          Null () as HRCOMPANYID,

          Null () as PO_NUMBER,

          Null () as PO_LINE_NUMBER,

          Null () as ITEM_NO,

          Null () as RECEIPTID,

          Null () as PO_CODE,

          Null () as DEPARTMENT,

          NULL () AS COST_CENTER,

          COMPANYID,

          INVOICE_NO,

          PAYVENDORID,

          VENDORID,

          CHECK_NO,

          EMPLOYEEID

      FROM [lib://Visualization_Inputs/PAYMENTS2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&DEPARTMENT&'_'&Null ()&'_'&Null ()&'_'&Null () AS EmpKey,

      COMPANYID&'_'&DEPARTMENT&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO&'_'&Null () AS InvKey,

          Null ()&'_'&COMPANYID&'_'&DEPARTMENT&'_'&Null () AS OrgKey,

          COMPANYID&'_'&INVOICE_NO&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&Null () as PmtKey,

          PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&DEPARTMENT AS POLineKey,

          COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&ITEM_NO&'_'&INVOICE_NO AS RecKey,

          COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&Null () AS ReqKey,

          Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as COST_CENTER,

          Null () as HRCOMPANYID,

          Null () as PAYVENDORID,

          Null () as CHECK_NO,

          PO_NUMBER,

          COMPANYID,

          PO_CODE,

          PO_LINE_NUMBER,

          ITEM_NO,

          VENDORID,

          RECEIPTID,

          INVOICE_NO,

          DEPARTMENT

      FROM [lib://Visualization_Inputs/PO LINE ITEM2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS EmpKey,

        COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO&'_'&Null () AS InvKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null () AS OrgKey,

          COMPANYID&'_'&INVOICE_NO&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&Null () as PmtKey,

          PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&Null () AS POLineKey,

          COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&INVOICE_NO AS RecKey,

          COMPANYID&'_'&Null ()&'_'&VENDORID&'_'&PO_NUMBER&'_'&Null () AS ReqKey,

      Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as COST_CENTER,

          Null () as DEPARTMENT,

          Null () as HRCOMPANYID,

          Null () as PAYVENDORID,

          Null () as CHECK_NO,

          Null () as PO_LINE_NUMBER,

      Null () as ITEM_NO,

      COMPANYID,

          PO_CODE,

          PO_NUMBER,

          VENDORID,

          INVOICE_NO

      FROM [lib://Visualization_Inputs/PO MASTER2.qvx]

      (qvx);

         

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&Null () AS EmpKey,

        COMPANYID&'_'&Null ()&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&INVOICE_NO&'_'&Null () AS InvKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&Null () AS OrgKey,

          COMPANYID&'_'&INVOICE_NO&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&Null () as PmtKey,

          PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&INVOICE_NO&'_'&Null () AS POLineKey,

          COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&INVOICE_NO AS POMastKey,

          COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&PO_LINE_NUMBER&'_'&VENDORID&'_'&ITEM_NO&'_'&INVOICE_NO AS RecKey,

          COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&Null () AS ReqKey,

          Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as COST_CENTER,

          Null () as DEPARTMENT,

          Null () as HRCOMPANYID,

          Null () as PAYVENDORID,

          Null () as CHECK_NO,

          COMPANYID,

          PO_NUMBER,

          PO_CODE,

          PO_LINE_NUMBER,

          VENDORID,

          ITEM_NO,

          INVOICE_NO

      FROM [lib://Visualization_Inputs/Receiving2.qvx]

      (qvx);

       

       

      LINKTABLE:

      Load Distinct

      COMPANYID&'_'&Null ()&'_'&Null ()&'_'&COST_CENTER&'_'&Null ()&'_'&Null () AS EmpKey,

        COMPANYID&'_'&Null ()&'_'&COST_CENTER&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&Null () AS InvKey,

          Null ()&'_'&COMPANYID&'_'&Null ()&'_'&COST_CENTER AS OrgKey,

          COMPANYID&'_'&Null ()&'_'&Null ()&'_'&VENDORID&'_'&Null ()&'_'&Null () as PmtKey,

          PO_NUMBER&'_'&COMPANYID&'_'&PO_CODE&'_'&Null ()&'_'&ITEM_NO&'_'&VENDORID&'_'&RECEIPTID&'_'&Null ()&'_'&Null () AS POLineKey,

          COMPANYID&'_'&PO_CODE&'_'&PO_NUMBER&'_'&VENDORID&'_'&Null () AS POMastKey,

          COMPANYID&'_'&PO_NUMBER&'_'&PO_CODE&'_'&Null ()&'_'&VENDORID&'_'&ITEM_NO&'_'&Null () AS RecKey,

          COMPANYID&'_'&ITEM_NO&'_'&VENDORID&'_'&PO_NUMBER&'_'&COST_CENTER AS ReqKey,

      Null () as PROCESS_LEVEL,

          Null () as EMPLOYEEID,

          Null () as DEPARTMENT,

          Null () as HRCOMPANYID,

          Null () as PAYVENDORID,

          Null () as CHECK_NO,

          Null () as PO_LINE_NUMBER,

          Null () as INVOICE_NO,

      COMPANYID,

          ITEM_NO,

          VENDORID,

          PO_NUMBER,

          COST_CENTER

      FROM [lib://Visualization_Inputs/Requisition2.qvx]

      (qvx);