# 22. Virtuoso Functions Guide - exec_result_names

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
__any_grants
close
collation_define
complete_table_name
delay
end_result
exec
exec_next
exec_result
exec_result_names
identity_value
name_part
registry_get
registry_get_all
registry_name_is_pro...
registry_remove
registry_set
result
result_names
row_count
sequence_get_all
sequence_next
sequence_remove
sequence_set
set_identity_column
set_row_count
set_user_id
signal
sinv_create_inverse
sinv_create_key_mapp...
sinv_drop_inverse
sys_stat_analyze
sys_stat_histogram
table_drop_policy
table_set_policy
username
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## exec_result_names

Supplies column details for procedure result set output.
exec_result_names (in res_names_array any);
Description

This function allows you to define the column details for result sets returned by procedures, in particular for use with the exec() function. This function is similar to result_names().

Parameters
res_names_array – This parameter can be one of two things:

- a vector of strings (like vector('cola', 'colbb')). When used that way it makes columns named 'cola' and 'colb' with type ANY and precision 256
- an array with the same format as the 0th element of the metadata returned by exec() and rexec(), which contains all the type information and can be used directly.

Return Types

None.

Examples
Result set column names

The procedure below uses the metadata from exec() to generate result set column names.

    create procedure XX1 ()
    {
      declare meta, _dt any;
      declare inx integer;
      exec ('select U_ID, U_NAME from SYS_USERS', null, null, null, 0, meta, _dt);
      inx := 0;

      exec_result_names (meta[0]);
      while (inx < length (_dt))
        {
          exec_result (_dt[inx]);
          inx := inx + 1;
        }
    };

See Also

exec()

rexec()

exec_result()