Home Forums SQL Server 7,2000 General need a big help-how to send an eamil from mail lis RE: need a big help-how to send an eamil from mail lis

  • Ilan,

    I think what you want to do it to create a single variable with a list of users and then set that as @recipients.

    Try this:

    declare @recipient varchar(1000)

    set @recipient = ''

    select @recipient = @recipient +

    case

    when @recipient > '' then ';'

    else ''

    end

    + EMAIL

    from dbo.users

    print @recipients

    This will create a single string of users delimited with ;

    Jeremy