dbMap/Web – Petrosys SQL Functions
Petrosys contains a range of pre-defined SQL functions, which can be used to extract information from a dbMapWeb database for use in reports.
A full list of the available functions are provided in the table below. Function parameters are listed in parenthesis.
dbMapWeb Function Name |
Arguments |
Purpose |
ps_well_surface_lat |
(UWI) |
Well surface latitude |
ps_well_surface_lon |
(UWI) |
Well surface longitude |
ps_well_bottom_lat |
(UWI) |
Well bottom latitude |
ps_well_bottom_lon |
(UWI) |
Well bottom longitude |
ps_well_path_tvd_m |
(UWI, DEPTH) |
Well path tvd in metres |
ps_well_path_tvd_ft |
(UWI, DEPTH) |
Well path tvd in feet |
ps_well_path_tvd_ss_m |
(UWI, DEPTH) |
Well path TVD subsea in metres |
ps_well_path_tvd_ss_ft |
(UWI, DEPTH) |
Well path TVD subsea in feet |
ps_feature_attribute_value |
(POLY_UID, ATTRIBUTE_NAME) |
Get the value of an attribute for a culture feature |
ps_sqlexp |
(EXPRESSION, DECIMAL_PLACES (optional)) |
Execute a numeric SQL expression |
ps_to_char |
(NUMBER, FORMAT) |
Format a number like Oracle's TO_CHAR function. Only available for Oracle connections or when using Oracle primary database. |
Care should be taken when writing very complex queries in which the results of one function might affect the outcome of another.
These functions can be used when reporting.