Sybernet / Supplied Functions Reference
Release 3.00
Mar 22, 2003
backwards forwards

HTTP.EVALUATE

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.


Syntax

Function EVALUATE
(
    CMD                           VARCHAR2
,   MAXLENGTH                     BINARY_INTEGER := 32767
)
RETURN VARCHAR2;

Parameters

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.


Returns

If no rows were found, NULL is returned. If more than one row is returned, an exception is raised. Otherwise, a VARCHAR2 is returned.


Example

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;


See Also

MYSELF
SP_HTML_INPUT



Sybernet is a trademark of SRI International.
Copyright © 1996-2008 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/