Table-valued Functions [dbo].[GetCustomerJoinField_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inCustomerIdint4
@inCustNumbervarchar(15)15
Permissions
TypeActionOwning Principal
GrantSelectMssExec
SQL Script
/*
*    Creates a table function for joining constant CustomerJoinField to other
*    views that have CustomerJoinField.
*    The GetCustomerJoinField_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].[GetCustomerJoinField_XLedger]( @inCustomerId int, @inCustNumber varchar(15) )
returns table as
    return (
        select
            CustomerJoinField = @inCustomerId
    )
GO
GRANT SELECT ON  [dbo].[GetCustomerJoinField_XLedger] TO [MssExec]
GO
Uses