Create VIEW [dbo].[ViwSellFactorDetailToDo]
AS
SELECT DISTINCT 
   Main.ID, Main.Number, Trucks.Date AS TrucksDate, Main.SellType, Main.SellTime, Main.BuyType, Main.BuyTime, Main.OrderDate,
   Main.ControlA, Main.ControlB, Main.ControlC, Main.ControlD

FROM      dbo.ViwAccSellFactor AS Main WITH (NOLOCK) 
		LEFT OUTER JOIN dbo.AccSellFactorTrucks AS Trucks WITH (NOLOCK) ON Main.ID = Trucks.SellFactorID 
 
GO


