EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 1004

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
System extended stored procedures
986
The filename is relative to the starting directory of the database server.
The function can be useful for inserting entire documents or images stored in
files into tables. If the file cannot be read, the function returns NULL.
The following statement inserts an image into a column named
picture
of the
table
t1
(assuming all other columns can accept NULL):
INSERT INTO t1 ( picture)
SELECT xp_read_file( ’portrait.gif’ )
xp_sprintf system procedure
Builds up a string from a format string and a set of input strings.
[
variable
= CALL ] xp_sprintf (
out-string
,
...
format-string
... [
input-string
, ... ] )
None.
xp_sprintf builds up a string from a format string and a set of input strings.
The format-string can contain up to fifty string placeholders (%s). These
placeholders are filled in by the input-string arguments.
All arguments must be strings of less than 254 characters.
The following statements put the string Hello World! into the variable
mystring.
CREATE VARIABLE mystring CHAR(254) ;
xp_sprintf( mystring, ’Hello %s’, ’World!’ )
xp_scanf system procedure
Extracts substrings from an input string and a format string.
[
variable
= CALL ] xp_scanf (
in-string
,
...
format-string
... [
output-string
, ... ] )
None.
xp_scanf extracts substrings from an input string and a format string. The
format-string can contain up to fifty string placeholders (%s). The values of
these placeholders are placed in the output-string variables.
All arguments must be strings of less than 254 characters.
The following statements put the string
World! into the variable
mystring.
Example
Function
Syntax
Permissions
Description
Example
Function
Syntax
Permissions
Description
Example

Table of Contents

Related product manuals