IBM Books

SQL Reference

DLVALUE

>>-DLVALUE--(--data-location------------------------------------>
 
>----+---------------------------------------------+--)--------><
     '-,--linktype-string--+--------------------+--'
                           '-,--comment-string--'
 

The schema is SYSIBM.

The DLVALUE function returns a DATALINK value. When the function is on the right hand side of a SET clause in an UPDATE statement or is in a VALUES clause in an INSERT statement, it usually also creates a link to a file. However, if only a comment is specified (in which case the data-location is a zero-length string), the DATALINK value is created with empty linkage attributes so there is no file link.

data-location
If the link type is URL, then this is an expression that yields a varying length character string containing a complete URL value. If the expression is not an empty string and does not include the URL scheme and URL server, then the defaults of scheme "FILE" and the server name of the database server are included in the complete URL value.

linktype-string
An optional VARCHAR expression that specifies the link type of the DATALINK value. The only valid value is 'URL' (SQLSTATE 428D1).

comment-string
An optional VARCHAR(254) value that provides a comment or additional location information.

The result of the function is a DATALINK value. If any argument of the DLVALUE function can be null, the result can be null; If the data-location is null, the result is the null value.

When defining a DATALINK value using this function, consider the maximum length of the target of the value. For example, if a column is defined as DATALINK(200), then the maximum length of the data-location plus the comment is 200 bytes.

Example:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]