[dbo].[vCustomerInformation]
CREATE view [dbo].[vCustomerInformation]
(
CustomerNumber,
CustomerName,
OnHold,
NoCreditFlag,
CreditLimit,
Inactive,
CustomerClass,
[Address],
City,
[State]
)
as
select
CustomerNumber = Customer.CUSTNMBR,
CustomerName = ltrim( rtrim( Customer.CUSTNAME ) ),
OnHold = case when Customer.HOLD = 1 then 'On Hold' else '' end,
NoCreditFlag = case when Customer.CRLMTTYP = 0 then 1 else 0 end,
CreditLimit = Customer.CRLMTAMT,
Inactive = Customer.INACTIVE,
CustomerClass = Customer.CUSTCLAS,
[Address] = Customer.[Address1],
City = Customer.City,
[State] = Customer.[State]
from RM00101_Synonym as Customer
GO
GRANT SELECT ON [dbo].[vCustomerInformation] TO [MssExec]
GRANT INSERT ON [dbo].[vCustomerInformation] TO [MssExec]
GRANT DELETE ON [dbo].[vCustomerInformation] TO [MssExec]
GRANT UPDATE ON [dbo].[vCustomerInformation] TO [MssExec]
GO