ALTER VIEW [dbo].[View_OrderD]
AS
SELECT dbo.OrderD_Table.OD_Id AS VOD_Id, dbo.Dealer_Table.DL_Name AS VDL_Name, dbo.OrderD_Table.OD_Net AS VOD_Net, dbo.OrderD_Table.OD_Date AS VOD_Date,
dbo.Product_Table.PD_Name AS VPD_Name, dbo.DetailOD_Table.DOD_Unit AS VDOD_Unit, dbo.DetailOD_Table.DOD_Num AS VDOD_Num,
dbo.DetailOD_Table.DOD_TCost AS VDOD_TCost, dbo.OrderD_Table.OD_Status AS VOD_Status, dbo.DetailOD_Table.DOD_Cost AS VDOD_Cost,
dbo.Dealer_Table.DL_Address AS VDL_Address, dbo.Dealer_Table.DL_Tel AS VDL_Tel
FROM dbo.DetailOD_Table INNER JOIN
dbo.OrderD_Table ON dbo.DetailOD_Table.OD_Id = dbo.OrderD_Table.OD_Id INNER JOIN
dbo.Product_Table ON dbo.DetailOD_Table.PD_Id = dbo.Product_Table.PD_Id INNER JOIN
dbo.Dealer_Table ON dbo.OrderD_Table.DL_Id = dbo.Dealer_Table.DL_Id
WHERE (dbo.OrderD_Table.OD_Status = '0')