/* * Creates a table function for finding customer address information by CustomerNumber and AddressCode that does an * index seek no matter which customer data source is used. * The GetCustomerAddressInformation_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. * */ createfunction[dbo].[GetCustomerAddressInformation_XLedger](@inCustNumbervarchar(15),@inAddressCodevarchar(15)) returnstableas return( select* fromCustomerAddressInformation_Synonym whereCustomerNumber=@inCustNumberand AddressCode=isnull(@inAddressCode,'') ) GO GRANTSELECTON[dbo].[GetCustomerAddressInformation_XLedger]TO[MssExec] GO