Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Has anyone worked with INTERVAL DAY TO SECOND Data Type over ODBC?

I am currently working with an Oracle table that stores some columns as

INTERVAL DAY TO SECOND Data Type

as I am retrieving the data over ODBC I get a "ODBC read error".

if I remove this field and get all other fields it works fine.

Has anyone out here used such a data type on oracle table and fetched it to QlikView?

what options are available?

regards

Leo V.

Labels (1)
1 Reply
rbecher
Partner - Master III
Partner - Master III

Hi Leo,

you can use a date operation (+/-) to convert this interval type to a number:

SELECT (duration + trunc(sysdate) - trunc(sysdate)) as n_duration FROM ...

or you can extract pieces and combine them:

SELECT EXTRACT(DAY FROM duration) ||

      ' days, ' || EXTRACT (HOUR FROM duration) ||

      ' hours, ' || EXTRACT (MINUTE FROM duration) ||

      ' minutes' as c_duration

FROM ...

It depends what you want to do with the interval value.

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine