Advertisement
Tylange1

Untitled

Feb 18th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.79 KB | None | 0 0
  1. -- InvoiceItemView Dataset
  2. SELECT InvoicedItemView.*
  3. FROM [Reporting].[InvoicedItemView] InvoicedItemView
  4. WHERE InvoicedItemView.InvoiceID = 1--INSERT the report InvoiceID parameter here
  5.  
  6. -- InvoiceLineItemAdjustment Dataset
  7. SELECT PenaltyBonusTypeGroup.PBTypeGroup, InvoiceLineItemAdjustment.*
  8. FROM [Invoicing].[InvoiceLineItemAdjustment] InvoiceLineItemAdjustment
  9. JOIN [dbo].[PenaltyBonusTypeGroup] PenaltyBonusTypeGroup ON PenaltyBonusTypeGroup.PBTypeGroupID = InvoiceLineItemAdjustment.PBTypeGroupID
  10. JOIN [Invoicing].[InvoiceLineItem] InvoiceLineItem ON InvoiceLineItem.InvoiceLineItemID = InvoiceLineItemAdjustment.InvoiceLineItemID
  11. JOIN [Invoicing].[Invoice] Invoice ON Invoice.InvoiceID = InvoiceLineItem.InvoiceID
  12. WHERE Invoice.InvoiceID = 1--INSERT the report InvoiceID parameter here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement