create view [dbo].[Vendor]
(
[Name],
VendorID,
City,
[State],
[Status],
Hold,
VendorStatus
)
as
select
rtrim( Vendor.VENDNAME ) as [Name],
rtrim( Vendor.VENDORID ) as VendorID,
rtrim( isnull( Vendor.CITY, '' ) ) as City,
rtrim( isnull( Vendor.[STATE], '' ) ) as [State],
case Vendor.VendStts
when 1 then convert( varchar( 9 ), 'Active' )
when 2 then convert( varchar(9), 'Inactive' )
when 3 then convert( varchar(9), 'Temporary' )
else convert( varchar(9), '' )
end as [Status],
case Vendor.Hold
when 1 then convert( varchar(7),'On Hold' )
else convert( varchar(7), '' )
end as Hold,
Vendor.VendStts as VendorStatus
from PM00200_Synonym as Vendor
GO
GRANT SELECT ON [dbo].[Vendor] TO [MssExec]
GRANT INSERT ON [dbo].[Vendor] TO [MssExec]
GRANT DELETE ON [dbo].[Vendor] TO [MssExec]
GRANT UPDATE ON [dbo].[Vendor] TO [MssExec]
GO