There are numerous ways to get the job done, but remember BO will run multiple dataprovider sequentially. So , for instance run this as first dataprovider:
SELECT TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),1,2))*3600+
TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),4,2))*60+
TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),7,2)) AS START FROM DUAL
(this is an example using ORACLE)
This query takes about 10 milliseconds to complete. The real dataprovider is created as second one, it takes 2 minutes to run.
The third dataprovider is:
SELECT TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),1,2))*3600+
TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),4,2))*60+
TO_NUMBER(SUBSTR(TO_CHAR(SYSDATE,'HH:MM:SS'),7,2)) AS END FROM DUAL
Now subtract START from END . This is very close to the time it takes for DP2 to run (because the DUAL queries as so fast...........)
A bit of calculating at report-level can give you nice notation again in minutes:seconds format....
T. Blom
Information analyst
tbl@shimano-eu.com