11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Alias property<br />

Description<br />

Establishes an alias for the table that the data block is associated with.<br />

Applies to table/columns associated with a data block<br />

Set <strong>Form</strong> <strong>Builder</strong><br />

Default<br />

The Data Block wizard sets the Alias property to the first letter of the table name. (For example, a table<br />

named DEPT would have a default alias of D.)<br />

Required/Optional required for <strong>Oracle</strong>8 tables that contain column objects or REFs<br />

Usage Notes<br />

For <strong>Oracle</strong>8 tables, SELECT statements that include column objects or REF columns must identify both<br />

the table name and its alias, and must qualify the column name by using that alias as a prefix.<br />

For example:<br />

CREATE TYPE ADDRESS_TYPE AS OBJECT<br />

(STREET VARCHAR2(30),<br />

CITY VARCHAR2(30),<br />

STATE VARCHAR2(2));<br />

CREATE TABLE EMP<br />

(EMPNO NUMBER,<br />

ADDRESS ADDRESS_TYPE);<br />

If the alias for this EMP table were E, then a SELECT statement would need to be qualified as follows:<br />

SELECT EMPNO, E.ADDRESS.CITY FROM EMP E;<br />

In this case, the alias is E. The column object ADDRESS.CITY is qualified with that alias, and the alias<br />

is also given after the table name. (The column EMPNO, which is a normal relational column, requires<br />

no such qualification.)<br />

In most situations, <strong>Form</strong> <strong>Builder</strong> will handle this alias naming for you. It will establish an alias name at<br />

design-time, and then automatically use the qualified name at runtime when it fetches the data from the<br />

<strong>Oracle</strong>8 Server. You only need to concern yourself with this alias naming if you are doing such things as<br />

coding a block WHERE clause.<br />

551

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!