Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

xp_read_file system procedure Next Page

xp_scanf system procedure


Extracts substrings from an input string and a format string.

Syntax

xp_scanf(
input_buffer,
format,
parm [, parm2, ... ]
)

Arguments
Remarks

The xp_scanf system procedure extracts substrings from an input string using the specified format, and puts the results in the specified parm values.

Permissions

None

See also
Example

The following statements extract the substrings Hello and World! from the input buffer Hello World!, and put them into variables string1 and string2, and then selects them:

CREATE VARIABLE string1 CHAR(254);
CREATE VARIABLE string2 CHAR(254);
CALL xp_scanf( 'Hello World!', '%s %s', string1, string2 );
SELECT string1, string2;