Views [dbo].[vCustomerInformation]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created8:58:09 AM Friday, December 7, 2018
Last Modified7:35:07 PM Tuesday, June 11, 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.
*
* This is NOT the TRUE definition of this view.  Modify the BuildvCustomerInformation stored procedure as that stored
* procedure uses dynamic SQL to create this view using the correct name of the GP or local database as needed.  This
* view is used so that CreateDatabase works (it expects vCustomerInformation to exist) and this solution uses this to
* provide coding suggestions.
*/

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
Uses
Used By