Page History
&<img src="../resources/images/opentocr.png" title="Open Contents list" border="0"&>
You are here:
...
A virtual column is a special feature provided as part of the LANSA Repository. Used properly, virtual columns can be very helpful in simplifying the processing of logic within applications and in improving the user interface of your applications.
A virtual column is a column which appears as part of a table but does not actually exist in the physical database table. Its value is dynamically derived based on the columns in the table. (Virtual columns can also be derived from other virtual columns.) Virtual columns provide flexibility, since you can combine or extract data from columns in a table and extend the information already contained in the table.
You may use virtual columns for implementing "conceptual structures" within the database. For example, you can take the columns CENTURY, YEAR, MONTH, DAY to create a single column called date. You could also store a date in YYMMDD format but retrieve and display it as MMDDYY or DDMMYY.
To a program, the column appears to exist as part of the table; however, the value is not actually stored but derived by the I/O Module when the record is input or output from the table. If you were to display the contents of the table, you would not see the virtual columns. Hence, virtual columns cannot be used as keys in a table. Some examples of using virtual columns:
...