Table-valued Functions [dbo].[GetCustomerAddressJoinFields_XLedger]
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_XLedger]( @inCustomerId int, @inCustomerAddressId int, @inCustNumber varchar(15), @inAddressCode varchar(15) )
returns table as
    return (
        select
            CustomerJoinField = @inCustomerId,
            CustomerAddressJoinField = @inCustomerAddressId
    )
GO
GRANT SELECT ON  [dbo].[GetCustomerAddressJoinFields_XLedger] TO [MssExec]
GO
Uses