/* * 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. * */ createfunction[dbo].[GetCustomerInformation_Legacy](@inCustNumbervarchar(15)) returnstableas return(select*fromCustomerInformation_SynonymwhereCustomerNumber=@inCustNumber) GO GRANTSELECTON[dbo].[GetCustomerInformation_Legacy]TO[MssExec] GO