Code database
To add the SQL code for the view, select the node in the left-hand pane that corresponds to the database type used in your runtime environment, namely :
- Code MsSQL - Microsoft SQL database
- Code Oracle - Oracle SQL database
- Code Db2 - IBM DB2 database
The SQL code is entered in the right-hand pane. To use parameter names in the code, prefix them with the "@" sign. Refer to the documentation for your database management system to learn which syntax can be used.
Note:
- The AMT Developer Studio does not perform any syntax checks on this code, therefore you must test it manually. If views are generated with code that is not valid for the database system that is used at runtime, this will lead to errors during the database reorganization.
- The order of the fields in the code must match the order in the fields definition. Or else the data gets assigned to the wrong field. There is no check if the order is ok.
- The table name used is written as "T_CUSTOMER". The AMT Developer Studio uses this to find the table names in the SQL code and mark the relations. Also at runtime this part is changed for the real table name (in case of reversed names) and also adds the necessary schema prefix for Oracle and optional any remote database prefixes for Oracle/MsSql.
- If you target only one database type then only that one code node needs to be filled. Else you need to specify also all other targets that are used at runtime. No sql syntax checking is performed.
- The usage of indexes and or materialized views is NOT implemented.
- After any change to a view, a database reorganization is necessary.