Re: Difference between two timestamp fields

2007-06-06 Thread Kathey Marsden
Dmitri Pissarenko wrote: Hello! > SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND, > APP.MyTable.startTime, APP.MyTable.endTime)} > FROM APP.MyTable > WHERE APP.MyTable IS NOT NULL Should this be WHERE APP.MyTable.startTime IS NOT NULL ? Thanks for the hint! Now I'm getti

Re: Difference between two timestamp fields

2007-06-05 Thread Dmitri Pissarenko
Hello! I found the error. This query is correct (SQL_TSI_SECOND instead of SQL_TSI_FRAC_SECOND): > > SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_SECOND, > > APP.MyTable.startTime, APP.MyTable.endTime)} > > FROM APP.MyTable > > WHERE APP.MyTable.startTime IS NOT NULL Thanks again.

Re: Difference between two timestamp fields

2007-06-05 Thread Dmitri Pissarenko
Hello! > SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND, > APP.MyTable.startTime, APP.MyTable.endTime)} > FROM APP.MyTable > WHERE APP.MyTable IS NOT NULL Should this be WHERE APP.MyTable.startTime IS NOT NULL ? Thanks for the hint! Now I'm getting this exception: SQL St

Re: Difference between two timestamp fields

2007-06-04 Thread Kathey Marsden
Dmitri Pissarenko wrote: Hello! I need to calculate the difference between two timestamp fields in seconds. I tried this query: SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND, APP.MyTable.startTime, APP.MyTable.endTime)} FROM APP.MyTable WHERE APP.MyTable IS NOT NULL

Difference between two timestamp fields

2007-06-04 Thread Dmitri Pissarenko
Hello! I need to calculate the difference between two timestamp fields in seconds. I tried this query: SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_FRAC_SECOND, APP.MyTable.startTime, APP.MyTable.endTime)} FROM APP.MyTable WHERE APP.MyTable IS NOT NULL but it doesn't work