Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have problem to write stored procedure that find the continuous absent days
chektime column shows the user is present
table are as

SQL
CREATE TABLE [dbo].[CHECKINOUT](
    [USERID] [int] NOT NULL,
    [CHECKTIME] [datetime] NOT NULL,
    [CHECKTYPE] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [VERIFYCODE] [int] NULL,
    [SENSORID] [nvarchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [WorkCode] [int] NULL,
    [sn] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [aaaaaCHECKINOUT_PK] PRIMARY KEY NONCLUSTERED
(
    [USERID] ASC,
    [CHECKTIME] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


plz help me
thanks in advance
Posted

1 solution

Can you post what you have tried so far?

Noone will do your homework for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900