The preceding sample query could also be changed so that users could add any valid column name to the SELECT clause. To do that, a variable with a blank default must be defined and added to the SELECT clause, as follows:
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 SELECT SALARY, 02 DEPT, 03 NAME, 04 ID, 05 1?__________________ 06 FROM STAFF 07 ORDER BY 2?DEPT_____________ .. =========================== B O T T O M ==================================
Note that a comma was added to the preceding column name and that the dialog fill character defines the whole variable. Read more about dialog fill characters on Reviewing the Process.
With the ORDER BY clause, three things are possible:
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 SELECT SALARY, 02 DEPT, 03 NAME, 04 ID, 05 1?__________________ 06 FROM STAFF 07 ORDER BY 1?DEPT_____________ .. =========================== B O T T O M ==================================
Make the entire ORDER BY clause into a variable by providing variables before and after the clause that are comment symbols. Substitutions for these symbols may be any two-letter word that is ignored by CA Dataquery.
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+. .. ================================ T O P ===================================== 01 SELECT SALARY, 02 DEPT, 03 NAME, 04 ID, 05 FROM STAFF 06 1?*/ 07 ORDER BY 2?DEPT___________ 08 3?/* .. =========================== B O T T O M ==================================
|
Copyright © 2014 CA.
All rights reserved.
|
|