MicroStrategy ONE

Create Email Subscription statement

Creates an email subscription.

Do not include any leading or trailing spaces in the ANSWER parameters. This causes a SQL error and prevents the command from executing.

Copy
CREATE EMAILSUBSCRIPTION 
 [subscription_name] [FOR OWNERlogin_name] SCHEDULEschedule_name (ADDRESSaddress_name| USERuser_name | CONTACTcontact_name[ADDRESS contact_address_name] | CONTACTGROUPcontact_group_name) CONTENT (report_or_document_name IN FOLDER location_name  | GUID 
 report_or_document_guid) [CONTENTTYPE (REPORT | DOCUMENT)] IN PROJECTproject_name DELIVERYFORMAT (HTML | CSV FILENAME filename 
 | PLAINTEXT FILENAME filename [TEXTDELIMITER (COMMA | SPACE | TAB | SEMICOLON | COLON 
 | OTHER custom_delimiter)] | EXCEL FILENAME filename | PDF FILENAME filename | FLASH FILENAME filename) [COMPRESSCONTENTS [PROTECTZIPFILE ZIPFILENAMEzip_file_name ZIPFILEPASSWORDzip_file_passwordEXPIRATIONDATEmm/dd/yyyy]]] FILENAMEfile_name SUBJECTsubject [MESSAGEmessage] [INCLUDELINK (TRUE|FALSE)] [HISTORYLINKWEBSERVERhistorylinkwebserver] [SENDPREVIEWNOW(TRUE|FALSE)] [SENDTOHISTORYLIST(TRUE|FALSE)] 
 [ [PROMPT 
 prompt_name1 ANSWER prompt_answer1 [, PROMPT prompt_name2 ANSWER prompt_answer2 [, .. PROMPT prompt_namen ANSWER prompt_answern]]];

where:

  • subscription_name is the name of the subscription

  • login_name is the login name of the subscription owner

  • schedule_name is the name of the schedule

  • address_name is the name of the address

  • user_name is the name of the user or group

  • contact_name is the name of the contact

  • contact_address_name is the name of the contact address

  • contact_group_name is the name of the contact or group

  • report_or_document_name isthe name of the report or document

  • location_name is the name of the folder where the report or document resides

  • report_or_document_guid is the GUID of the report or document

  • project_name is the name of theproject where the report or document resides

  • zip_file_name is the name of the zip file (for compression purposes)

  • zip_file_password is the password of the zip file

  • mm/dd/yyyy is expiration date for the zip file

  • file_name is the name of the file

  • custom_delimiter is the single character used as a custom text delimiter

  • subject is the subject of the email

  • message isthe body message of the email

  • historylinkwebserver is the "base URL" to the email subscription

  • prompt_name1..n are the names of prompts in the report or document

  • prompt_answer1..n are the answers to the corresponding prompts