2020-11-30 17.30.sql 751 B

12345678910111213141516171819202122232425262728293031
  1. USE [befri_Goldhoo]
  2. GO
  3. /****** Object: View [clearance].[V_ItemAccount] Script Date: 2020/11/30 17:15:21 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. CREATE VIEW [Discount].[V_ItemAccount]
  9. AS
  10. SELECT i.InventoryId ,
  11. i.InventoryNumber ,
  12. i.InventoryName ,
  13. i.InventoryCategoryId ,
  14. i.Spec ,
  15. i.AliasName ,
  16. i.SearchCode ,
  17. i.SalesPrice * ( da.DiscountCoef / 100 ) SalesPrice ,
  18. i.IsClearance ,
  19. ISNULL(da.DiscountCoef, 0) DiscountCoef ,
  20. ISNULL(da.Quantity, 0) Quantity ,
  21. i.Description
  22. FROM Discount.DiscountAcc da
  23. LEFT JOIN basedata.Inventory i ON i.InventoryId = da.InventoryId
  24. GO