dbi-users  

selecting millisecond or microsecond accuracy from varray of timestamps

Carlson, John W.
Thu, 28 Jan 2010 15:23:31 -0800

We have an oracle type,

CREATE OR REPLACE TYPE ARCHIVE.VOLTAGE_TIMESTAMP_ARRAY AS VARRAY(200) OF 
TIMESTAMP;

We would like to get millisecond or microsecond accuracy out of these 
timestamps.  We are currently using DBD::Oracle 1.21.  Here is a sample query, 
with several varrays & rows being returned for an identifier, which we stitch 
together based on timestamp. (there may be several rows per identifier).

select identifier, output_voltage, output_current, voltage_timestamp from 
CTS_VOLTAGE_ARCHIVE where unit = 'CRYO' and shot_id = ? order by sample_num

We are getting the varray values out with an array reference, not a table 
function.  We would like to continue doing this.  I am not currently sure what 
accuracy the inserts into the varray are.  I am wondering if upgrading to 
DBD::Oracle 1.23 would improve the situation about getting millisecond or 
microsecond accuracy.

Thanks,
John Carlson