这是让我在 TEXT FORMAT 中输出 HH:MM:SS的查询。我想要时间格式的输出,以便可以对其进行操作、排序和搜索。
我可以把它作为一个数字吗?
EXTRACT (DAY FROM interval)*10 + EXTRACT (HOUR FROM interval) -
CASE
WHEN EXTRACT(HOUR FROM CAST(date2 AS TIMESTAMP)) > EXTRACT(HOUR FROM CAST(date 1 AS TIMESTAMP))
THEN
14
ELSE
0
END || ':' || EXTRACT (MINUTE FROM interval) || ':' ||
EXTRACT (SECOND FROM interval) CB_END_TV_START