.JOIN Macro

Repeats a statement for column couple in a join.

Syntax

.JOIN("statement","prefix","suffix","last_suffix")

Argument

Description

statement

Statement to repeat for each column

prefix

Prefix for each new line

suffix

Suffix for each new line

last suffix

Suffix for the last line

Example

In a trigger for the table TITLE, the following macro:

.FOREACH_PARENT()
where .JOIN("%PK%=%FK%", " and", "", ";")
message 'Reference %REFR% links table %PARENT% to %CHILD%'
 .ENDFOR

generates the following trigger script:

message 'Reference TITLE_PUB links table PUBLISHER to TITLE
Note: For columns, the macro JOIN only accepts the variables %PK%, %AK%, and %FK%.