[sql] Alter a SQL server function to accept new optional parameter