Ok so I have a large query that has 4 parameters in it..
CREATE FUNCTION [dbo].[Doorsdoorsdoors]
(
@start datetime,
@end datetime,
@day varchar,
@doornumber int
)
RETURNS TABLE AS RETURN (
SELECT bla bla bla....
What I want to do is set their default parameters to all (*)
So when I use the select statement I can use default so it returns all results like below:
SELECT * FROM Doorsdoorsdoors (default,default,default,default)
I would imagine it is something like this:
CREATE FUNCTION [dbo].[Doorsdoorsdoors]
(
@start datetime LIKE '%',
@end datetime LIKE '%',
@day varchar LIKE '%',
@doornumber int LIKE '%'
)
RETURNS TABLE AS RETURN (
SELECT bla bla bla....
Or possibly done in the SELECT * FROM Doorsdoorsdoors (default,default,default,default) with something like this..
SELECT * FROM Doorsdoorsdoors ('%','%','%','%')
NULLs as default