BookmarkSubscribeRSS Feed
Tejas1
Calcite | Level 5

I will be sending out dynamic emails in my organisation highlighting certain anomalies in metrics of customers. I have the values of these anomalies in form of a SQL table, and I am able to export these values in form of a CSV file attached to the dynamic email in Outlook. I want these values in form of table output, which will be displayed in the outlook email body, and not as a attached CSV file.

 

Seeking guidance!

7 REPLIES 7
PaigeMiller
Diamond | Level 26

You want "table output", but that's pretty vague, can you show us (even if the numbers in the table are fake) what this "table output" should look like?

 

Is your concern creating the table, or putting the table in e-mail, or both? If it is adding the table to e-mail, please read https://communities.sas.com/t5/SAS-Programming/send-email-from-SAS-add-reports-and-text-in-body-of-e...

--
Paige Miller
Tejas1
Calcite | Level 5

I am using proc sql to obtain data from a SQL table that I have created in Oracle SQL. I can get this SQL table output in format of a CSV file (containing the data in tabular format) attached in email body. Instead, I need the output of the SQL table in a tabular format, in the email body, and not as an attachment.

PaigeMiller
Diamond | Level 26

Hello, @Tejas1 

I asked some questions and I don't think you answered them. You simply repeated the same information that was in your first post, which isn't helpful.

--
Paige Miller
Tejas1
Calcite | Level 5

Ok I will try to share a basic output of mail I am looking for. I have the output of below mentioned table in a SQL table, I want the same to be attached in Email body that would be sent out dynamically to a set of users.

 

Hi Mr. XYZ,

 

Your anomolous customers and the details around it are as follows (Inserts the data in attached Excel file in the email body)-

 

.

.

.

 

Regards,

Tejas

 

 

 

 

PaigeMiller
Diamond | Level 26

Most of us (including me) refuse to download attachments, if you want to show us something, make a screen capture and then include it in your reply by using the "Insert Photos" icon.

 

I asked a question and I still don't see an answer. I asked "Is your concern creating the table, or putting the table in e-mail, or both?" Please provide an answer, don't make me repeatedly ask you this. 

--
Paige Miller
Tejas1
Calcite | Level 5

Apologies I couldn't answer your question.

 

"Is your concern creating the table, or putting the table in e-mail, or both?"- My concerns are both.

 

Sharing the image of expected table format.2023-01-19 09_23_58-Table Output - Excel.png

PaigeMiller
Diamond | Level 26

I have already provided a link on how to include tables in your e-mail.

 

I can't be more specific about the method of creating this table, as you haven't provided data, other than I will say this looks like a job for PROC REPORT.

 

 

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 893 views
  • 0 likes
  • 2 in conversation