Structural Definition
Each IliSQLTable object must have an associated SQL SELECT statement that is submitted to the database system whenever the rows of the SQL table object need to be recomputed.
The following shows an example of an SQL SELECT statement:
SELECT EMP.ID, EMP.NAME, EMP.DEPTNO
FROM EMP
WHERE EMP.DEPTNO = 3
ORDER BY 2
When you submit this statement, the result is an ordered collection of rows, each of which has three values (EMP.ID, EMP.NAME and EMP.DEPTNO). These rows are extracted from the database table named EMP and they are sorted by NAME (ORDER BY 2). Not all rows are extracted from table EMP: only the rows whose EMP.DEPTNO is equal to 3. In other words, this SQL statement returns the ID, NAME, and DEPTNO of all employees working in department number 3.
An SQL SELECT statement can have more than one database table referenced in the FROM clause. Here is an example:
SELECT EMP.ID, EMP.NAME, DEPT.NAME
FROM EMP, DEPT
WHERE EMP.DEPTNO = DEPT.ID
The rows produced by this query are obtained by combining rows from the database tables EMP and DEPT through a join operation.
An IliSQLTable object can be defined so that its SQL query resembles one of the statements shown above. Two different techniques can be used to achieve this. The following sections describe these techniques: creating the definition interactively using Rogue Wave Views Studio and creating the definition in pure C++.
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.