Q: How to display an SQL query result in email body? September 05, 2024

I have the following result from an SQL query, and I would like to find an easy way to display this table in the body of an email I send. Could you please help me with this?

A: Certainly! You may insert the SQL query result table into the body of the email by following these steps. September 05, 2024

Step 1: Right-click the location in the body template where you want to insert the table, then click the "Insert SQL Table" menu item.

Click "Insert SQL Table" to open the "Insert SQL Table" wizard

Step 2: Enter your SQL statement then click "Next".

Enter your SQL statement then click "Next"

The system will then run the SQL statement you entered and obtain the field information returned by the SQL statement.

Step 3: Select the fields you want to display in the table from the list on the left, and add them to the list on the right.

Select the fields you want to display in the table

Step 4: Set the style of the table, such as cell color, font, and column width.

Set table style

You can double-click a cell to set the column name and display options for the column.

Set column options

After completing the wizard, the system will display a table icon in the body template. You can double-click this icon to modify the content of the table.

The icon of the table

After the task runs, the system will execute the SQL statement you entered and convert the query results into a table displayed in the body.

The result after the task runs

Tip: You can place multiple tables like this in the email body.

If the answers provided above do not resolve your issue, please contact us, and we will offer further solutions tailored to your needs.