Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
UTL_FILE , 16 of 18
This procedure is a formatted PUT
procedure. It works like a limited printf
(). The format string can contain any text, but the character sequences %s
and \n
have special meaning.
%s |
Substitute this sequence with the string value of the next argument in the argument list. |
\n |
Substitute with the appropriate platform-specific line terminator. |
See also PUTF_NCHAR Procedure.
UTL_FILE.PUTF ( file IN FILE_TYPE, format IN VARCHAR2, [arg1 IN VARCHAR2 DEFAULT NULL, . . . arg5 IN VARCHAR2 DEFAULT NULL]);
The following example writes the lines:
Hello, world! I come from Zork with greetings for all earthlings. my_world varchar2(4) := 'Zork'; ... PUTF(my_handle, 'Hello, world!\nI come from %s with %s.\n', my_world, 'greetings for all earthlings');
If there are more %s
formatters in the format parameter than there are arguments, then an empty string is substituted for each %s
for which there is no matching argument.
INVALID_FILEHANDLE
INVALID_OPERATION
WRITE_ERROR
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|