I can group by just fine on a bit column running SP4. You can not index a bit field however. In all honesty, creating a index on a bit field makes a whole lot of no sense because the index will be ignored anyway when the server does the execution plan. A bit field will always result in a...
I am totaly missing something. This piece:
COALESCE(@Output, '')
will ALWAYS return an empty string, no exceptions. You are declaring @Output right above it, and nothing is being done to @output before it gets to the COALESCE function, so it will ALWAYS be null.
Therefore, the sql statement...
Use the Dateadd function, and change the update to update -1 second.
Declare @Temp Table(EmpId Integer, Project VarChar(10), PunchIn SmallDateTime, Punchout SmallDateTime)
Insert Into @Temp Values(1,'A','09:00:00','10:30:00')
Insert Into @Temp Values(1,'B','10:32:00',NULL)
Insert Into @Temp...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.