|
Sybernet / Supplied Procedures Reference
Release 3.00 Oct 14, 2002 |
|
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.
Procedure SP_HTML_CAS_PARSE
(
LINE VARCHAR2
, RSLT OUT VARCHAR2
, VALUE OUT VARCHAR2
, DELIMITER VARCHAR2
) ;
| 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. |
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;
RSLT is NULL NULL World,Hello RSLT is NULL green