>>can we cant create a function which don't return any value.what purpose would a function serve that doesn't return anything?As you probably guessed the error is that you don't have a RETURNS clause nor a RETURN statement.EDIT:create function dbo.listname() returns varchar(1000)AS BEGINDeclare @authorname varchar(1000)SELECT @authorname = coalesce(@authorname + ',' + AuthorName, AuthorName)FROM Authorreturn @authornameENDgo
Be One with the OptimizerTG