Chapter 16 Writing SQL Statements in PowerDesigner


AKCOLN

Description

Repeats a statement for each alternate key in a table

Syntax

.AKCOLN("statement","prefix","suffix","last_suffix", "condition")

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
condition Alternate key code (if condition argument is left empty the macro returns a statement for each alternate key in the table)

Example

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

message .AKCOLN("'%COLUMN% is an alternate key column'","", "", "", "AKEY1")

generates the following trigger script:

message 'TA_ORDER is an alternate key column',

Note   Column variable only
For columns, the macro AKCOLN only accepts the variable %COLUMN%.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.