use befri_Goldhoo
go

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

Create View basedata.V_ReplenishReason
as
SELECT Rr.ReplenishReasonId, Rr.ReasonName, Rr.ReasonType, RrN.[Text] AS ReasonTypeName, Rr.[Description]
FROM basedata.ReplenishReason Rr
LEFT  JOIN dbo.ValueTextMap RrN ON Rr.ReasonType = RrN.Value AND  TableName = 'basedata.ReplenishReason' AND FieldName = 'ReasonType'
go
