Page 1 of 1

calculate time in csv file

PostPosted: Sun Jan 03, 2016 8:24 pm
by captlid
which sql engine does dbeaver use for sql queries on csv files? ansi sql or t-sql?

I have an imported csv file with two columns in it, duration which is in the time format hh:mm:ss, but dbeaver imported it as a string field.

I was trying to add up the duration columns per domain and I am not getting anywhere..

Get a null result in the generated total column.

SELECT sum("Duration") as "total", "Domain"
FROM "TimeData" group by "Domain"

This is the query I tried to run on the csv data source.

Do I have to convert the duration column to something else or can I strip out the colons and then I'll just add the minutes together and then add the seconds to the minutes to get the total times.. Thanks,