Improvments to SQL Server functions.