25 lines
462 B
Transact-SQL
25 lines
462 B
Transact-SQL
USE [AIS2025]
|
|
GO
|
|
|
|
/****** Object: View [dbo].[ZZV_SalOrder] Script Date: 2025/9/8 14:00:06 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
|
|
ALTER VIEW [dbo].[ZZV_SalOrder]
|
|
AS
|
|
|
|
SELECT *
|
|
,(SELECT SUM(f.FAllAmount) FROM T_SAL_ORDERENTRY_F f WITH(NOLOCK) WHERE f.fid=a.fid AND f.FAllAmount>0) ZhengShuHeJi
|
|
FROM dbo.T_SAL_ORDER a WITH(NOLOCK)
|
|
WHERE a.FDOCUMENTSTATUS='C'
|
|
|
|
--select * from ZZV_SalOrder
|
|
--where F_CONTACTNUMBER='P202506060020-HH02'
|
|
GO
|
|
|
|
|