Chapter 15 Writing SQL Statements in PowerDesigner
Repeats a statement for column couple in a join.
.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 |
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
Primary key, alternate key, and foreign keys variables only
For columns, the macro JOIN only accepts the variables %PK%, %AK%, and %FK%.
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |