kamikazeniel
New Member
Hi guys, i need to convert this SQL statement to SQL-92.
select
a.User_PID as User_PID,
a.Int_Data1 as Door_ID,
a.Local_DT as TimeInOut,
a.Int_Data2 as BadgeCd,
'Web Service' as CreateUserID,
getdate() as CreateDate
from dbo.journ as a
inner join (select c.User_pid, Max(c.Local_DT)as Timer from dbo.journ as c where c.msg_code = 2 group by c.user_pid ) as b
on a.User_pid = b.User_pid and a.Local_DT = b.Timer
I can't run this in Progress DB. I believe the problem is with this statement "a.Local_DT = b.Timer".
select
a.User_PID as User_PID,
a.Int_Data1 as Door_ID,
a.Local_DT as TimeInOut,
a.Int_Data2 as BadgeCd,
'Web Service' as CreateUserID,
getdate() as CreateDate
from dbo.journ as a
inner join (select c.User_pid, Max(c.Local_DT)as Timer from dbo.journ as c where c.msg_code = 2 group by c.user_pid ) as b
on a.User_pid = b.User_pid and a.Local_DT = b.Timer
I can't run this in Progress DB. I believe the problem is with this statement "a.Local_DT = b.Timer".