You are on page 1of 1

CREATE view [dbo].

[APU_Swipedetails]
as
select userid as CardNo, logdate as Sw_Time, case when direction like 'in' then
1 when direction like 'out' then 2 else 0 end as door, 0 AS Location,
0 AS CanteenId
FROM
[dbo].[DeviceLogs_10_2016]
GO

You might also like