Extracts and returns the property name from a <msgheader> and <msgproperties> document. The result is a null value if the value of the integer parameter is less than one or greater than the number of properties in msg_doc.
msgpropname_call ::= msgpropname(integer[ ,msg_doc]), ) msg_doc ::= basic_character_expression prop_name::= basic_character_expression
makes the request to use the msgpropname function.
the <msgheader> or <msgproperties> XML document. A basic_character_expression. If msg_doc is not specified, the current value of @@msgprpoperties is used.
the property name from which you want to extract a value or type. A basic_character_expression.
This example assumes that a call from msgrecv returns a message with a single property named trade_name and value of “Acme Maintenance” (“Quick & Safe”). The value of the @@msgproperties global variable is then:
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <msgproperties trade_name='Acme Maintenance ("Quick & Safe")'> </msgproperties>
The ampersand and the quotation marks surrounding the phrase Quick
& Safe
are replaced with the XML entities "
and &
,
as required by XML convention.
Retrieves the eighth property from the most recent message retrieved:
select msgpropname(8, @@msgproperties)
Returns a null value, because the ninth property does not exist:
select msgpropname(9, @@msgproperties)
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |