使用以下 SQL 查询:
SELECT
TOP (100) PERCENT
ID_BADGE,
LEFT(RIGHT('000000' + CAST(TIME_TRX AS varchar), 6), 2)
+ ':' + SUBSTRING(LEFT(RIGHT('000000' + CAST(TIME_TRX AS varchar), 6), 4), 3, 2) AS ClockTime,
DATE_TRX, SEQ_REC, ROWID
FROM
omi.TAHIST_ZERO
WHERE
(ID_BADGE = ' ' + @Badge)
AND (DATE_TRX BETWEEN @Date AND @Date2)
AND (SEQ_REC IN ('0', '1000'))
AND (CODE_TRX IN ('100', '101'))
ORDER BY
DATE_TRX, TIME_TRX
我创建了下表:
使用Reporting Services 表达式我想从 ClockTime 的第三个值中减去 ClockTime 的第二个值。
我查看了 VB 函数,我能找到的只有 First、Last、Min 和 Max,而不是第二或第三。