xp_sscanf Extended Stored Procedure
Reads data from the string into the argument locations given by each format argument.
Syntax
xp_sscanf string, format, [, argument]...
where
-
string
-
Is the character string to read the argument values from.
-
format
-
Is a formatted character string similar to what is supported by the C-language sscanf. Currently only the '%s' format argument is supported.
-
argument
-
Is a varchar output parameter that will return the value of the corresponding format argument. Up to 50 arguments can be specified.
Example
In this example, the @filename parameter will contain the value authors10.tmp.
DECLARE @filename varchar (255)
EXEC xp_sscanf 'sync -b -fauthors10.tmp', 'sync -b -f%s',
@argument1=@filename OUTPUT
Permission
Execute permission defaults to the public group.
See Also