I would like to generate attendance sheet. The Number of columns in the grid/table will be around 35 columns along with employee empid, Name, Total Attendance (it is just like attendance register).
S.No Name JobId S/O 1 2 3 4..........30 31 Tworkingday NoofAttendance
1 AB A1 B P A P P..........P P 31 30
2 BC A2 C P A P P..........P A 31 29
3 CD A3 D P A P P..........P P 31 30
4 EF A3 E P P P P..........P P 31 31
[edit]Code block added - OriginalGriff[/edit]
i have two table.
CREATE TABLE [dbo].[Attendance](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [varchar](50) NULL,
[Date] [date] NULL,
[Systemdate] [datetime] NULL,
[Attendance] [nchar](1) NULL,
[site] [varchar](50) NULL,
[update1] [nchar](1) NULL,
[overtime] [decimal](18, 0) NULL,
[Attendance1] [nchar](1) NULL,
CONSTRAINT [PK_Attendance]
CREATE TABLE [dbo].[LabourRegistration](
[JobId] [varchar](50) NOT NULL,
[Name] [varchar](50) NULL,
[FHName] [varchar](50) NULL,
[Gender] [varchar](50) NULL,
[Age] [varchar](50) NULL,
[Category] [varchar](50) NULL,
[Address] [varchar](50) NULL,
[UploadPhotograph] [varchar](50) NULL,
[DateofRegistration] [varchar](50) NULL,
[ContractorId] [varchar](50) NULL,
[ContractorName] [varchar](50) NULL,
[site] [varchar](50) NULL,
CONSTRAINT [PK_LabourRegistration_1] PRIMARY KEY CLUSTERED
(
[JobId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]