Hi, sorry Im not entirely familiar with the tables in Navision SQL, but if they are anything like normal Navision, Purchase Invoices relate using the following criteria: Purchase Invoice Header → Purchase Invoice Line Via “Document No.” = “No.” -------------------------------- Purchase Invoice Header → Posted Document Dimension Via “Table ID” = 122 “Document No.” = “No.” “Line No.” = 0 --------------------------------- Purchase Invoice Line → Posted Document Dimension Via “Table ID” = 123 “Document No.” = “Document No.” “Line No.” = “Line No.” ---------------------------------- Purchase Header (Purchase Order) → Purchase Line Via “Document No.” = “No.” ---------------------------------- Purchase Header (Purchase Order) → Document Dimension Via “Table ID” = 38 “Document Type” = 1 “Document No.” = “No.” “Line No.” = 0 ---------------------------------- Purchase Line → Document Dimension Via “Table ID” = 39 “Document Type” = 1 “Document No.” = “Document No.” “Line No.” = “Line No.” Hope this makes sense. Basically, both headers and lines have dimensions against them. Posted documents such as invoices are stored in “Posted Document Dimensions”. Unposted in “Document Dimensions”. Do let me know if this does not make sense, or if you need further info. Regards, edd