Views [dbo].[Vendor]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created9:45:26 AM Friday, December 7, 2018
Last Modified9:13:11 AM Friday, November 8, 2024
Columns
Name
Name
VendorID
City
State
Status
Hold
VendorStatus
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
/**
* This view is used by Vendor quick find controls.
*/

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
Uses