Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
55 views2 pages

SQL Command

This document contains SQL statements that update, select, insert, and delete data from various database tables including employees, attendance logs, and device logs. The statements update employee statuses and codes, select data for specific employees, update attendance log times and statuses, and insert a new record into the device logs table. Transactions are committed and rolled back.

Uploaded by

A Rah UL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

SQL Command

This document contains SQL statements that update, select, insert, and delete data from various database tables including employees, attendance logs, and device logs. The statements update employee statuses and codes, select data for specific employees, update attendance log times and statuses, and insert a new record into the device logs table. Transactions are committed and rolled back.

Uploaded by

A Rah UL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

select * from employees

UPDATE employees
SET status='Resigned' , DOR ='2015-11-28'
WHERE employeename='30'
delete from employees WHERE employeename='30'
delete from employees WHERE isnumeric(employeename) <> '0'
use etimetracklite1
select * from Employees
UPDATE employees
SET EmployeeCode = 'SMF-8053' , NumericCode = '8053'
WHERE EmployeeId = '24359'
select * from EmployeesBio where EmployeeId = '24359'
select * from Employees where EmployeeId = '24359'

Begin tran a
Rollback tran a
Commit tran a
update AttendanceLogs set InTime = '2016-05-27 13:56:00' , OutTime = '2016-05-2
7 22:04:00' where AttendanceDate = '2016-05-27 00:00:00.000'and EmployeeId ='263
23'

recent
USE ETIMETRACKLITE1
select * from Employees where EmployeeCode = 'US-1224'
select * from AttendanceLogs where EmployeeId = '25523' and AttendanceDate >= '2
016-05-21'
begin tran a
update AttendanceLogs set InTime = '2016-06-03 13:56:00' , OutTime = '2016-06-03
22:01:01' , status = 'Present' , Present = '1' , Absent = '0' , statuscode ='P'
where AttendanceDate = '2016-06-03' and EmployeeId = '25523'
select * from dbo.vw_AttendanceLogs where EmployeeCode = 'US-1224' and Attendanc
eDate = '2016-06-03'

commit tran a
to insert the attendance
insert into dbo.DeviceLogs (DownloadDate , DeviceId , UserId , LogDate, Directio
n , WorkCode) values ('2016-06-20' , '22' ,'101615' , '2016-06-20 22:03:58.000',
'out' , '0')

You might also like