|
Sybernet / Supplied Functions Reference
Release 3.00 Mar 22, 2003 |
|
This function evaluates a select statement. Since this procedure returns a varchar, only one column from one row of a table may be specified. The column retrieved, however, may be of any datatype (including CLOB and BLOB). Regardless of the type, no value longer than 32,767 characters can be returned.
Function EVALUATE
(
CMD VARCHAR2
, MAXLENGTH BINARY_INTEGER := 32767
)
RETURN VARCHAR2;
| Parameter | Description |
|---|---|
cmd |
This is the SELECT statement that is to be evaluated. |
maxlength |
This optional parameter determines that maximum characters that can be retrieved. If the value retrieved exceeds this limit, an exception is raised. |
If no rows were found, NULL is returned. If more than one row is returned, an exception is raised. Otherwise, a VARCHAR2 is returned.
The following example illustrates how to call evaluate:
declare
rowid varchar(30);
begin
rowid:=http.evaluate('select min(rowid) from http.cron');
http.writeln('rowid=' || rowid);
end;