Sybernet / Supplied Procedures Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.SP_HTML_CAS_PARSE

This procedure is used to parse input lines of text for the purpose of extracting comma or tab delimited data. It is especially useful when uploading data files from your web browser into Oracle.

Syntax

Procedure SP_HTML_CAS_PARSE
(
    LINE                          VARCHAR2
,   RSLT                   OUT    VARCHAR2
,   VALUE                  OUT    VARCHAR2
,   DELIMITER                     VARCHAR2
)   ;

Parameters

Parameter Description
line
 
The line to parse.
rslt
 
The input parameter after extracting the next token.
value
 
The value of the next token.
delimiter
 
A character that describes how tokens are separated. Comma is the default.

Example

The following example illustrates how to call sp_html_cas_parse. Note that true NULL values are NULL. This can be the keyword NULL or a null token between two commas. Because the second parameter is quoted, this is the string "NULL" and not a true NULL:

declare
    LINE varchar(255) := 'NULL,"NULL","World,Hello",,green';
    RSLT varchar(255) := null;
begin
    loop
        http.sp_html_cas_parse (line,line,rslt);
        exit when rslt is null and line is null;
        if (rslt is NULL) then
            writeln('RSLT is NULL');
        else
            writeln(rslt);
        end if;
    end loop;
end;

The output resembles the following:

RSLT is NULL
NULL
World,Hello
RSLT is NULL
green



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