3
Reply

Creating a table in SQL using values of two table with some

jack R

jack R

Mar 14 2017 2:55 AM
225
creating a table in SQL using values of two table with some hard coded values.
i want to insert punchin and puchout for each employee_code which i will get from [AttendanceCorrection].[dbo].[Tbl_FMOEmp] and Punch_Date from [Zultime].[dbo].[TIME_SHEET]

What I have tried:

INSERT INTO Tbl_EmpNotPunching
select
(SELECT [employee_Code] FROM [AttendanceCorrection].[dbo].[Tbl_FMOEmp]) as employee_Code,
(SELECT distinct [Punch_Date] FROM [Zultime].[dbo].[TIME_SHEET]) as Punch_Date,
'7:30' as PunchIN,
'16:30' as punchOUT

Answers (3)