Question about Sp calling another sp

  • have a stored proc which sends email. in the @email i can add email addresses. When i have to change the email address i have to alter the sp everytime. How can i make another SP with all the emails and call that Sp within my SP.

    This is the SP

    Declare @attachments varchar(255)

    Declare @subject varchar(255)

    Declare @query varchar(255)

    Declare @email varchar(255)

    SET @Email = ' here i want to call all the email address from the second SP'

    SET @Attachments = 'c://temp'

    SET @Subject = 'hello'

    exec send mail

    @profile_name = 'something'

    @receipents ='@email'

    @file_attachemnets='@attachments'

    @subject=@subject

    how i figured it out. insted of calling another SP i created a table and called that table.

    What i did i created a table with the email address and in teh code i selected the email addresses

    SET @Email = ' select * from emailddresses'

  • Please don't delete the post. If you find out the information, post the answer as a response. It helps others learn that might have a similar problem.

  • Hi

    As Steve suggested..If you were able to find teh asnwer to your question then it would be great to post the answer in this forum. It will certainly help others.

    Thanks -- Vijaya Kadiyala

    http://www.dotnetvj.vom

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply