To reference an SQL table in SQL statements, code the table name preceded by a schema name qualifier. For example, in this statement:
SELECT * FROM DEMOSCH.SAMPLE
SAMPLE is the table name and DEMOSCH is the SQL schema in which it is defined.
The combination of schema name and table name allows the SQL compiler to look up the definition of the table in the SQL catalog.
To access a non-SQL record from an SQL statement, code the record name in the same way. Define an SQL schema that maps to the corresponding non‑SQL schema, and use the SQL schema name to qualify all subsequent references to non-SQL records in SQL DML statements. For example:
CREATE SCHEMA SQLNET
FOR NONSQL SCHEMA PRODDICT.CUSTSCHM;
SELECT * FROM SQLNET."ORDER-REC";
Note: For more information about defining SQL schemas, see the CA IDMS Database SQL Option Reference Guide for syntax and information about accessing non‑SQL databases and CA IDMS Database Administration Guide for process‑related information.
|
Copyright © 2009 CA.
All rights reserved.
|
|