Table-valued Functions [dbo].[GetCustomerAddressJoinFields_Legacy]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inCustomerIdint4
@inCustomerAddressIdint4
@inCustNumbervarchar(15)15
@inAddressCodevarchar(15)15
Permissions
TypeActionOwning Principal
GrantSelectMssExec
SQL Script
/*
*    Creates a table function for joining constant CustomerJoinField and optionally CustomerAddressJoinField values to other
*    views that have CustomerJoinField and optionally CustomerAddressJoinField.
*    The GetCustomerAddressJoinFields_Synonym will be set to use the appropriate function for the current
*    system, based upon if they have XLedger, GP, QuickBooks or no accounting system.
*/

create function [dbo].[GetCustomerAddressJoinFields_Legacy]( @inCustomerId int, @inCustomerAddressId int, @inCustNumber varchar(15), @inAddressCode varchar(15) )
returns table as
    return (
        select
            CustomerJoinField = @inCustNumber,
            CustomerAddressJoinField = isnull( @inAddressCode, '' )
    )
GO
GRANT SELECT ON  [dbo].[GetCustomerAddressJoinFields_Legacy] TO [MssExec]
GO
Uses
Used By