Selecting data to unload
SELECT COL01, COL02, 'CONSTANT', INTEGER(123)
WHERE COL02 = '20'
ORDER BY COL01
FROM NGT.UNLOAD_TEST
In the list of selected expressions, you can specify column names, functions, expressions, and constants, just as you would with SQL. You can also use the SQL CASE construct to apply logic to data and substitute values.
You can also use concatenation, substring operations, functions, and special registers. For more information, see BMC-AMI-Utilities-SQL-language.
Selecting rows
By default, BMC AMI Unload unloads all table rows.
You can filter the rows to be unloaded using one of the following methods:
- Adding a WHERE clause
- Using the MAXROWS option
- (for image copies) Selecting with an alternate OBID
You can specify a WHERE clause and the MAXROWS option simultaneously. If you specify both, BMC AMI Unload applies the WHERE clause first, then MAXROWS.
You can specify SQL WHERE clauses that contain subselects in BMC AMI Unload. For more information about BMC AMI Unload WHERE clauses, see BMC-AMI-Utilities-SQL-language.