Previous Topic

Next Topic

Book Contents

Book Index

Customizing the display of particular data types

Sometimes, you need to display particular columns using a certain column function. Examples:

AQT provides a generic mechanism for dealing with columns such as this. This is done by coding a displaycol specification in the cfg file. Example:

Note: where : appears, the column name will be substituted.

How this works

By default, when AQT displays a table, it builds a Default Query. In most cases this is:

select * from table

When a displaycol setting is used, the Default Query will be:

select col1, col2, to_char(timestamp_col) as timestamp_col from table

This will display the data using the function specified in the displaycol specifications (to_char in this example).

This default query will be used when you display a table, or go to the Run SQL or Query Builder windows. If you specify select * from table, the displaycol specification will not be used.

Other uses for Displaycol

This is a flexible option that can be used for a number of purposes.

To prevent the display of BLOB columns, code:

displaycol;blob;'BLOB data, not displayed';

To display only the first 1000 bytes of a CLOB column, code:

displaycol;clob;left(:,1000);