Is it possible to make input parameters of a function optional? I have seen in on a stored procedure with @intSku INT = 1 but this same syntax doesn't seem to work on a function. Is there a different way?
RE: Can a User Defined Function have Optional Para
If this is a SQL Server question then I don't think UDF's can have optional params as you have seen in stored procs. You might try a simple trick to turn them off by passing NULL. Use this in the WHERE clause - "WHERE (SomeCol = @SomeParam OR @SomeParam IS NULL)" if you are talking about a table valued function. Passing in NULL for the param as indicated earlier. Or you can use defaults in which case you also have to spec DEFAULT in the UDF call for each so you don't gain much.