Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    73

    Unanswered: Emailing Query Results

    Is there a way to have SQL server email the results of a Select query to someone?

  2. #2
    Join Date
    Oct 2003
    Posts
    60
    From BOL:


    xp_sendmail
    Sends a message and a query result set attachment to the specified recipients.

    Syntax
    xp_sendmail {[@recipients =] 'recipients [;...n]'}
    [,[@message =] 'message']
    [,[@query =] 'query']
    [,[@attachments =] 'attachments [;...n]']
    [,[@copy_recipients =] 'copy_recipients [;...n]'
    [,[@blind_copy_recipients =] 'blind_copy_recipients [;...n]'
    [,[@subject =] 'subject']
    [,[@type =] 'type']
    [,[@attach_results =] 'attach_value']
    [,[@no_output =] 'output_value']
    [,[@no_header =] 'header_value']
    [,[@width =] width]
    [,[@separator =] 'separator']
    [,[@echo_error =] 'echo_value']
    [,[@set_user =] 'user']
    [,[@dbuse =] 'database']
    jaraba

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •