Views [dbo].[CustomerAddressPhoneNumbers_Legacy]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created6:57:31 AM Friday, September 12, 2025
Last Modified6:57:31 AM Friday, September 12, 2025
Columns
Name
CustomerJoinField
CustomerAddressJoinField
PhoneNumber1
PhoneNumber2
PhoneNumber3
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script

/**
* Do NOT access this view by this view name.  Instead, use the vCustomerAddressPhoneNumbers_Synonym which will either
* point to this view or to thevCustomerAddressPhoneNumbers_XLedger as appropriate for that system.
*
* IMPORTANT -- READ ON
* ====================
* This view MUST return the same named columns and data types and in the same order as the
* vCustomerAddressPhoneNumbers_XLedger view, which is why they can be hot swapped when XLedger is
* activated/deactivated.
*/

create view [dbo].[CustomerAddressPhoneNumbers_Legacy]
(
    CustomerJoinField,
    CustomerAddressJoinField,
    PhoneNumber1,
    PhoneNumber2,
    PhoneNumber3
)
as
select
    CustomerJoinField = RM00102.CUSTNMBR,
    CustomerAddressJoinField = RM00102.ADRSCODE,
    PhoneNumber1 = case
        when isnull( RM00102.PHONE1, '' ) != '' and RM00102.PHONE1 != '00000000000000' then RM00102.PHONE1
        else null
    end,
    PhoneNumber2 = case
        when isnull( RM00102.PHONE2, '' ) != '' and RM00102.PHONE2 != '00000000000000' then RM00102.PHONE2
        else null
    end,
    PhoneNumber3 = case
        when isnull( RM00102.PHONE3, '' ) != '' and RM00102.PHONE3 != '00000000000000' then RM00102.PHONE3
        else null
    end
from RM00102_Synonym as RM00102
GO
GRANT SELECT ON  [dbo].[CustomerAddressPhoneNumbers_Legacy] TO [MssExec]
GRANT INSERT ON  [dbo].[CustomerAddressPhoneNumbers_Legacy] TO [MssExec]
GRANT DELETE ON  [dbo].[CustomerAddressPhoneNumbers_Legacy] TO [MssExec]
GRANT UPDATE ON  [dbo].[CustomerAddressPhoneNumbers_Legacy] TO [MssExec]
GO
Uses
Used By