SQL Server 中的这个视图正在获取我们然后根据管理时间显示的记录,我现在需要在 Oracle 10g 中执行此操作,我必须在这里转换什么样的差异?
/* Formatted on 1/29/2013 3:39:19 PM (QP5 v5.227.12220.39724) */
SELECT p.facility_key,
CAST (p.unit_code AS VARCHAR) + '-' + CAST (p.room AS VARCHAR)
AS unit_code,
p.first_name,
p.last_name,
m.admin_time,
CONVERT (varchar (5),
datediff (s,
m.admin_time,
getdate ())
/ 3600)
+ ':'
+ CONVERT (varchar (5),
datediff (s,
m.admin_time,
getdate ())% 3600 / 60)
AS ELAPSED
FROM OTEN.TEN_M_PATIENT_MAST AS P INNER JOIN
OP.ORD_M_ADMIN AS M ON P.PAT_NUMBER = M.PAT_NUMBER
WHERE (M.ADMIN_TIME BETWEEN DATEADD(DAY, - 1, GETDATE()) AND GETDATE())