Home Docs Changelog Download Pricing Customer Portal Contact

Using Simple Tables

SQLMessenger User Manual - Using Simple Tables

 

1 What is a Simple Table?

In SQLMessenger, you can easily convert the results of an SQL query into a table that can be sent as an attachment in an email, or convert the query results into an HTML table to display in the body of an email. This kind of table is referred to as a Simple Table.

Convert the results of an SQL query into a simple Excel table

Convert the results of an SQL query into a simple Excel table.

2 The Structure of Simple Tables

The first row of the Simple Table is the header row, and the second row and subsequent rows are data rows.

The structure of the Simple Table

The structure of the Simple Table.

3 Converting Query Results into an Excel Spreadsheet

In SQLMessenger, you can convert the results of an SQL query into a Simple Table in Excel format.

You can add multiple SQL queries to a single attachment, with the results of each query placed in a separate Sheet.

Multiple queries in one Excel attachment

Multiple queries in one Excel attachment.

Excel attachment with multiple Sheets

The spreadsheet file generated after the task execution.

Below are the steps for creating a simple table in the attachment:

Step 1: Create an attachment template in the task.

Create an attachment template in the task

Step 2: Select "Convert the query results to a spreadsheet file or text file" for "Template Type", then click "New Query" to add a query statement.

Select template type and add new query

Step 3: Select the data source and enter the query statement.

Select data source and input query statement

Step 4: Click "Next Step". The system will execute the SQL statement and display the field list of the query results. Select the fields to be displayed in the table from the left list, then add them to the right list. After adding, click "Next Step".

Select and add fields to the table

Step 5: Set the display style of the data in the table designer. Then click "Next Step".

Set data display style in table designer

Step 6: Set the Sheet Name for the table (optional). Then click "Finish".

Set Sheet Name and complete the setup

4 Converting Query Results into an HTML Table

In SQLMessenger, you can convert the results of an SQL query into an HTML table and display it in the email body generated by a task.

The system displays the query results in the email body

Below are the steps for creating a simple table in the email body template:

Step 1: Click the "Insert SQL Table" menu item in the context menu of the body template.

Click the "Insert SQL Table" menu item in the context menu of the body template

Step 2: Enter SQL query statements.

Enter SQL query statements

Step 3: Select the fields to convert into the HTML table.

Select the fields to convert into the HTML table

Step 4: Set the display format for the table and fields.

Set the display format for the table and fields

The converted HTML table

The converted HTML table.

5 Using the Simple Table Style Designer

You can use the "Table Style Designer" to modify the style of a Simple Table, such as column width, row height, color, font, and other styles.

Simple Table Style Designer

Simple Table Style Designer.

In this dialog box:

Add or remove SQL fields from the Simple Table.

Remove fields from the Simple Table.

Move the selected field to the left or right.

When converting the query results into an Excel table, you can click this button to freeze the selected columns.

When converting the query results into an Excel table, you can click this button to freeze the header row.

Display the SQL query results in transposed format.

Set the format for the selected cells.

Set the table width (HTML only), along with other options.

Dynamically add all SQL fields to the result table

If this option is selected, the system will add all fields returned by the SQL query to the Simple Table. You can use this feature to dynamically add all columns to the Simple Table.

Last updated on June 05, 2024


Cookie Settings

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies in accordance with our Cookie Policy.

You can change your preferences at any time by clicking on "Cookie Settings" in the website footer.

Cookie Preferences

Manage your cookie preferences. You can enable or disable different types of cookies below. Necessary cookies cannot be disabled as they are required for the website to function properly.

Necessary Cookies

Always active

These cookies are essential for the website to function and cannot be switched off. They are usually only set in response to actions made by you such as setting your privacy preferences, logging in or filling in forms.

Preferences Cookies

Makes the site easier to use

These cookies allow the website to remember choices you make and provide enhanced, more personal features.

Analytics Cookies

Helps us improve our website

These cookies help us understand how visitors interact with our website, which helps us improve our products and services.

Marketing Cookies

Used to track visitors across websites

These cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging.

Leave us a message. Tell us what you need, and we'll take care of the rest.