SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[hw_v_zpjjmxb]
AS
SELECT t1.FInterID AS FID, CONVERT(nvarchar(40), t1.FInterID) + 'A' AS FNumber, CONVERT(nvarchar(40), t1.FInterID) + 'B' AS FName
    ,t1.jjDate,t1.ygNo,t1.ygNm,t1.zlNo,t1.cpNm,t1.price,t1.fqty
    ,t1.jtrs,t1.je,t1.bz,t1.zje,t1.jjcsbt,t1.gwbt,t1.jjdh,bz.FNAME AS bznm
FROM dbo.hw_zpjjmxb AS t1
    LEFT OUTER JOIN dbo.GAT_DAY_ZP AS t2 ON t1.jjdh = t2.FBILLNO
    LEFT OUTER JOIN dbo.GAT_BANZU_L AS bz ON t2.F_CBM = bz.FID

GO