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
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
__any_grants
close
collation_define
complete_table_name
delay
end_result
exec
exec_metadata
exec_next
exec_result
exec_result_names
exec_score
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 & Internet
XML
XPATH & XQUERY

Functions Index

exec_score

Compiles a SQL statement and returns the estimate time cost
exec_score (in str varchar, out state varchar, out message varchar);
Description

This function provides dynamic SQL capabilities in Virtuoso PL. The first argument is an arbitrary SQL statement, which may contain parameter placeholders. The function returns as output parameters a SQL state, error message and returns the estimate time cost in milliseconds.

Parameters
str – A varchar containing arbitrary SQL using ?'s for parameter markers.
state – An output parameter of type varchar set to the 5 character SQL state if the exec resulted an error. Not set if an error is not present.
message – An output parameter of type varchar set to SQL error message associated with the error. Not set if an error is not present.
Return Types

The function returns a float number which is the calculated estimate time cost for the query execution.

Errors

The function will generate a SQL 22023 error value if a supplied parameter is not of the type expected.

See Also:

List of SQL 22023 errors.

Examples

SQL> select exec_score ('select * from T1');