Viewing 15 posts - 1 through 15 (of 16 total)
dwain.c (2/11/2013)
No idea because I don't know what Day 01, Day 02, etc. are supposed to represent.
;WITH Punches AS (
SELECT *
...
February 11, 2013 at 8:40 am
Day 01 represents sunday and Day 02 - monday and so on.
February 11, 2013 at 7:14 am
dwain.c (2/11/2013)
MAX(day_value)-DATEDIFF(minute,MIN(punchTime), MAX(punchTime))/60.
dwain, Thanks again.
how can i compare the day_name between @table and shiftpatterns table to get day_value from shiftpattern table.
I added an extra line in the...
February 11, 2013 at 6:14 am
dwain.c (2/11/2013)
p.ramchander (2/11/2013)
Now, I created a...
February 11, 2013 at 5:16 am
I agree with you vinu. Dwain's logic is very nice and simple. Thanks Dwain for your time and help. I replaced the logic with your's.
Now, I created a table named...
February 11, 2013 at 3:55 am
vinu512 (1/22/2013)
Declare @table Table(ClockID Int, EmployeeID int, punchTime DateTime, punchType Bit)
Insert into @table
Select 8,769,'2013-01-22 14:26:35.590',1
Union ALL
Select 9,769,'2013-01-22...
January 23, 2013 at 7:24 am
Thanks for the pointer scott. It worked for me.
November 15, 2012 at 7:09 am
Thanks Cadavre. your solution also worked.
September 19, 2012 at 3:16 am
Thanks a ton mike your solution worked for me.
September 19, 2012 at 3:13 am
Not necessarily grouping by months, there are chances that the interval starts end of month and ends in first week on next month
September 19, 2012 at 3:10 am
yes, the difference between the start date and end date is fixed to 1 day difference.
September 19, 2012 at 2:58 am
DECLARE @STARTDATE DateTime
SET @STARTDATE = '2011/11/11 15:25:26.680'
DECLARE @ENDDATE DateTime
SET @ENDDATE = '2011/11/11 15:25:48.957'
SELECT(DATEDIFF(d,@STARTDATE, @ENDDATE)) as DaysDiff,
(DATEDIFF(ww,@STARTDATE, @ENDDATE)) as WeeksDiff,
(DATEDIFF(hh,@STARTDATE, @ENDDATE)) as HoursDiff,
(DATEDIFF(MINUTE,@STARTDATE, @ENDDATE)) as MinDiff,
(DATEDIFF(SS,@STARTDATE, @ENDDATE)) AS SecDiff,
CAST(DATEDIFF(HH,@STARTDATE,@ENDDATE) AS...
November 16, 2011 at 1:57 am
Hi Sree
Try this code
selectconvert(varchar(50), [Name]) as FullName,
convert(varchar(50), Title) as Title,
convert(varchar(50), TelephoneNumber) as PhoneNumber,
convert(varchar(50), mail) as Email,
convert(varchar(50), department) as Department
INTO [Table Name]
fromopenquery(ADSI,'selectName, Title, TelephoneNumber, mail, department
FROM ''LDAP://OU=Users,OU=,DC=,DC=,DC=,DC=''
WHERE objectCategory...
October 6, 2009 at 8:26 am
Viewing 15 posts - 1 through 15 (of 16 total)