this is easier:
ALTER PROCEDURE [dbo].[getCommaDelim]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @list varchar(1000)
set @list = ''
SELECT @list =@list + name + ',' from customers
select @list
END
if the @list is not set thusly:
set @list = ''
then the result will be null
if the @list is not set thusly:
set @list = ''
then the result will be null
No comments:
Post a Comment