Hi,
I'd like to get your opinion on 2 ways of implementing the same stored procedure. Any advice would be greatly appreciated.
Implementation 1
CREATE PROC GetFileSize(@Path varchar(500) = NULL, @FileID int = NULL)
AS
IF @Path IS NULL
' Find the file by @FileID and return its size
ELSE
' Find the file by @Path and return its size
Implementation 2
CREATE PROC GetFileSizeByPath(@Path varchar(500))
AS
CREATE PROC GetFileSizeByFileID(@FileID int)
AS
Which implementation do you prefer and why?
Cheers, Mosh