I am working on a Biometric Attendance System. The device generates these User punch logs
based on the number of users registered in it. Now the problem is every month a new table is automatically generated to store the device logs whenever I try to sync the hardware logs with its communication SDK.
For example:
For all User punches
in July 2017, there is an SQL table called DeviceLogs_7_2017
. Similarly, for August, there is DeviceLogs_8_2017
.
Now I am making a different front end (other than the software provided with the system) using Visual Studio 2012 and C#, and I need to read these logs from my front end to calculate the attendance using some formula.
Now I don't know exactly how to read them as they are changing every month.
Can this be done using variables in some stored procedure query?
The table description is as below:
DeviceLogId int NULL
DownloadDate datetime NULL
DeviceId int NULL
UserId nvarchar 50
LogDate datetime NULL
Direction nvarchar 100
AttDirection nvarchar 255
C1 nvarchar 255
C2 nvarchar 255
C3 nvarchar 255
C4 nvarchar 255
C5 nvarchar 255
C6 nvarchar 255
C7 nvarchar 255
WorkCode nvarchar 100
UpdateFlag int NULL
Out of this table I want the data in the UserID
, LogDate
and WorkCode
columns. Please help me to get my head working in the direction of some idea to solve this problem.