Table-valued Functions [dbo].[GetCustomerInformation_XLedger]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inCustNumbervarchar(15)15
Permissions
TypeActionOwning Principal
GrantSelectMssExec
SQL Script
/*
*    Creates a table function for finding customer information by CustomerNumber that does an
*    index seek no matter which customer data source is used.
*    The GetCustomerInformation_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].[GetCustomerInformation_XLedger]( @inCustNumber varchar(15) )
returns table as
    return ( select * from CustomerInformation_Synonym where CustomerNumber = @inCustNumber )
GO
GRANT SELECT ON  [dbo].[GetCustomerInformation_XLedger] TO [MssExec]
GO
Uses