Extracts substrings from an input string and a format string.
xp_scanf( input_buffer, format, parm [, parm2, ... ] )
input_buffer Use this CHAR(254) parameter to specify the input string.
format Use this CHAR(254) parameter to specify the format of the input string, using placeholders (%s) for each parm argument. There can be up to fifty placeholders in the format argument, and there must be the same number of placeholders as parm arguments.
parm Use one or more of these CHAR(254) parameters to specify the substrings extracted from input_buffer. There can be up to 50 of these parameters.
The xp_scanf system procedure extracts substrings from an input string using the specified format, and puts the results in the specified parm values.
None
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; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |