Views [dbo].[vCustomerInformation]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created8:58:09 AM Friday, December 7, 2018
Last Modified9:20:30 AM Friday, November 8, 2024
Columns
Name
CustomerNumber
CustomerName
OnHold
NoCreditFlag
CreditLimit
Inactive
CustomerClass
Address
City
State
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
/**
* This view is for ProServ, used in custom reports. Don't rename the view without confirmation from ProServ.
*/

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 and Customer.INACTIVE = 1 then 'On Hold, Inactive'
        when Customer.HOLD = 1 then 'On Hold'
        when Customer.INACTIVE = 1 then 'Inactive'
        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
Uses
Used By