Welcome to Catalog Tips

Search more than 200 articles to learn more about creating and automating your product catalogs

Tip: Start typing in the input box for immediate search results.

< All Topics
Print

SQL – Execute an SQL statement

Overview

This Custom Field executes an SQL statement. The data Sources are virtual tables. It requires the Relational module.

Syntax

SQL(‘SQLstatement’,‘OutputFormat’)

SQL(‘SELECT * FROM ”SHIRTS” WHERE SIZE = ‘XXL’,‘HTML’)

Element Description
SQLstatement The SQL statement to execute.
OutputFormat The output format. Valid values are ‘XML’, ‘HTML’, ‘HTMLnoheader’, ‘text’, ‘textnoheader’

Example

SQL(‘SELECT * FROM ”SHIRTS” WHERE SIZE = ‘XXL’,‘text’)

SHIRTS SIZE
Style A S
Style A L
Style A XXL
Style B S
Style B M
Style C XXL

In the above example SQL(‘SELECT * FROM ”SHIRTS” WHERE SIZE = ‘XXL’,‘text’) will return ‘Style A, Style C‘.

See also

Table of Contents