23.10.2012 Views

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Meta-<strong>SQL</strong> 65<br />

Meta-<strong>SQL</strong><br />

'Meta-<strong>SQL</strong>' Use (with reference to PeopleS<strong>of</strong>t)<br />

Meta-<strong>SQL</strong> expands to platform-specific <strong>SQL</strong> substrings, causes another function to be called, or substitutes a value.<br />

Meta-<strong>SQL</strong> constructs are used in functions that pass <strong>SQL</strong> strings, such as the following:<br />

• <strong>SQL</strong>Exec.<br />

• Scroll buffer functions (ScrollSelect and its relatives).<br />

• PeopleS<strong>of</strong>t Application Designer dynamic and <strong>SQL</strong> views.<br />

• Some Rowset class methods (Select, SelectNew, Fill, and so on.).<br />

• The <strong>SQL</strong> class.<br />

• PeopleS<strong>of</strong>t Application Engine programs.<br />

• Some Record class methods (Insert, Update, and so on.).<br />

• COBOL functions.<br />

Meta-<strong>SQL</strong> Element<br />

Types There are three types <strong>of</strong> meta-<strong>SQL</strong> elements:<br />

• Construct<br />

Constructs are a direct substitution <strong>of</strong> a value, and help to build or modify a <strong>SQL</strong> statement. Examples include<br />

%Bind, %InsertSelect, and %List.<br />

• Function<br />

Functions perform actions or cause another function to be called. Examples include %ClearCursor, %Execute, and<br />

%ExecuteEdits.<br />

• Meta-variable.<br />

Meta-variables enable substitution <strong>of</strong> text within <strong>SQL</strong> statements. Examples include %AsOfDate, %Comma, and<br />

%JobInstance.<br />

Meta-<strong>SQL</strong> Placement Considerations: Not all meta-<strong>SQL</strong> can be used by all programs. Some meta-<strong>SQL</strong> can be used<br />

only in Application Engine programs. Other meta-<strong>SQL</strong> can only be used as part <strong>of</strong> a <strong>SQL</strong> statement in a <strong>SQL</strong> or<br />

dynamic view. The following table lists available meta-<strong>SQL</strong> elements and where each element can be used.<br />

If a meta-<strong>SQL</strong> construct, function, or meta-variable is supported in PeopleCode, it is supported in all types <strong>of</strong><br />

PeopleCode programs; that is, in Application Engine PeopleCode programs (actions), component interface<br />

PeopleCode programs, and so on.<br />

Note. Even if a meta-<strong>SQL</strong> element is used in PeopleCode, you cannot use meta-<strong>SQL</strong> like a built-in function. You<br />

can use meta-<strong>SQL</strong> in the <strong>SQL</strong>Exec function, the Select method, the Fill method, and so on. Note. Meta-<strong>SQL</strong> is not<br />

available in SQR

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

Saved successfully!

Ooh no, something went wrong!