select distinct homelaborleveldsc2 from vp_person
and employmentstatus = 'Active'
order by homelaborleveldsc2
Results:
District 1
District 10
District 11
District 12
District 2
District 3
District 4
District 5
District 6
District 7
District 8
District 9
Drivers
Home Office
Regional Office...
I can't do that b/c there are certain jobcodes that dont need data to come back for it, but I still need to show null.
Yet these two jobcodes are the same job, and I need only one row to come back for each..
Either one row with data and the person info,
or one row with the jobtitle and all...
I know I could do something like this
select distinct LOCATION,
ISNULL((SELECT top 1 CONVERT(CHAR (26), JOBTITLE) FROM dbo.PS_RD_EMPLOYEES_VW B WHERE JOBCODE IN ('2336','2337') AND B.LOCATION = A.LOCATION), 'Grocery Operations Manager')AS GOM,
(SELECT top 1 NAME FROM dbo.PS_RD_EMPLOYEES_VW B...
ISNULL((SELECT top 1 CONVERT(CHAR (26), JOBTITLE) FROM dbo.PS_RD_EMPLOYEES_VW B WHERE JOBCODE IN ('2336','2337') AND B.LOCATION = A.LOCATION), 'Grocery Operations Manager')AS GOM,
(SELECT top 1 NAME FROM dbo.PS_RD_EMPLOYEES_VW B WHERE JOBCODE IN ('2336','2337') AND B.LOCATION = A.LOCATION)AS...
Need help rounding to one decimal place from two datetime fields.
So far I have.
SELECT PERSONNUM,
ROUND(convert(decimal(10,1), datediff(minute, shiftstartdate, shiftenddate) / 65.0), 1)
FROM VP_SCHEDULE
WHERE PERSONNUM = '016902'
AND SHIFTSTARTDATE = '2007-03-27 06:00:00.000'
That brings...
select
personnum,
timeinseconds,
wageamount,
applydate,
startdtm,
enddtm
from vp_totals
where personnum = '103786'
and applydate >= '2008-11-30 00:00:00.000'
and applydate <= '2008-12-06 00:00:00.000'
and paycodename = '01 REG'
Let's say I have the following code. The attachment file is a...
Convert(VarChar(2), MRD.EARLIESTSTARTTM / 3600) + ':' + Convert(VarChar(2), MRD.EARLIESTSTARTTM / 60 % 60)
This is what got me close. Yet, it brought back the right values. Just some values that were lets say 15:00 would come back as 15:0
CASE WHEN i.TotalWeekHoursMinutes > MRW.MAXHOURSNUM THEN 'Worked more than ' + CAST(CONVERT(DECIMAL(5,2), MRW.MAXHOURSNUM / 60.00) AS VARCHAR(5))+ ' total week hours'
WHEN i.DayTotalMinutes > MRD.MAXHOURSNUM and i.applydate = i.schoolcalendardt THEN 'Worked more than ' +...
I need a way to convert this field into hh:mm
=Fields!TotalTimeSeconds.Value
It comes back as total seconds for a day.
I need to do this in reporting services somewhere inside the field textbox itself.
I was using
Convert(VarChar(2), sum(timeinseconds) / 3600) + ':' + Convert(VarChar(2)...
An extra /24 just gives me different values.
With this formula in sql
Convert(VarChar(2), sum(timeinseconds) / 3600) + ':' + Convert(VarChar(2), sum(timeinseconds) / 60 % 60) as TotalTime,
I can get it to come back correctly, minus one place behind the value. So it would 21600 seconds would...
Thanks.
Convert(VarChar(2), sum(timeinseconds) / 3600) + ':' + Convert(VarChar(2), sum(timeinseconds) / 60 % 60) as TotalTime,
with this code for time calculations..
is their a way to get two decimal places?
so right now.. I have some solutions come back as 25:4
and I need another 0 on that...
I have this code.
select
laborlevelname2,
laborlevelname3,
personnum,
applydate,
laborlevelname4,
personfullname,
laboracctname,
timeinseconds,
Convert(VarChar(5), DateAdd(Minute, timeinseconds / 60, 0), 108) As HourMin,
wageamount,
laborleveldsc5
from vp_totals
where applydate >= '2007-01-01'...
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.