This BLOCK statement assumes that an argument will be passed that holds an integer equal to the change order priority. The WHERE clause first checks the number of arguments passed ($#). If one is present, it is used to evaluate the expression to produce the WHERE clause; otherwise a null WHERE clause is substituted (" ").
BLOCK chg (“SELECT priority FROM Change_Request”,
$# > 1 ? “WHERE priority =“ ## $1 : ““) {}
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |