Is there a way to set a parameter and only type in part of the word? Below is what I currently have:
{?Recruiter} = "All" or {Command.FullName} like {?Recruiter}
I am entering Recruiter as: 'Amb%'
I am using like because one might not know the full/correct spelling of the recruiter name so...
Okay, I removed that and now I am getting this error:
Incorrect syntax near the keyword 'insert'. What am I doing wrong now?
DECLARE @StartDate datetime
SET @StartDate = '2008-1-1'
DECLARE @EndDate datetime
SET @EndDate = '2008-1-31'
Create table #vacationpay_types (paycodeid int, paycodedesc...
I am struggling with the "Incorrect syntax near the keyword 'UNION'" in the below code. Could someone please tell me what I am doing wrong in the below code:
DECLARE @StartDate datetime
SET @StartDate = '2008-1-1'
DECLARE @EndDate datetime
SET @EndDate = '2008-1-31'
Create table...
Does anyone know how to print a value as a column heading in the report? Here is the data I am pulling:
[Week1] = sum( case when DATEPART(ww, weekending) = 1 then isnull( e.AllTCHours, 0) else 0 end ),
[Week2] = sum( case when DATEPART(ww, weekending) = 2 then isnull( e.AllTCHours, 0) else...
What I need to accomplis is:
1- get all candidates who has at least 90-180 days between startdate and @quarter:
declare @quarterstart datetime
SET @quarterstart = '4/1/2009'
Create table #candidates (candidateid int, indentificationdetails nvarchar(50), firstname nvarchar(50), lastname...
I got it! Thanks for that information because that is what helped me figure it out. This is what I ended up with:
[Week6] = sum( case when DATEPART(ww, weekending) = 6 then isnull( e.AllTCHours, 0) else 0 end ),
[Week7] = sum( case when DATEPART(ww, weekending) = 7 then isnull( e.AllTCHours...
It current prints out like this:
Jan Feb Mar Apr
2 4 13 10
What I would like to do is this:
Week1 Week2 Week3 Week4
2 4 13 10
based on the parameter being passed:
209-2-1 --> 2009-2-28
Thanks!
Thanks a bunch!!
-T
Below is the current code I have summing data based on a month, how can I get it to be broken down by week?
Here is the code:
[Jan] = sum( case when Month( WeekEnding) = 1 then isnull( e.AllTCHours, 0) else 0 end ),
[Feb] = sum( case when Month( WeekEnding) = 2 then isnull( e.AllTCHours...
I am trying to create a or statement and what I have is a case statement to handle the 2nd half of it. This is what I need to accomplish:
anyone who has at least 90 days of employment between their earliest start date of all of their jobs, and their latest end date of any of their jobs (or the...
I have the below code:
--build our data for each profit center:
INSERT INTO #profitCenterSummary(profitCenterId,workperiodnum, fiscalyear,
tempsonstreet, clients, totalhrs, reghrs,otherhrs,avgpayrate,avgbillrate,
fulltimeeqiv, avgtothrs, avgreghrs, aveotherhrs, markuppct...
I have the below code and it is not giving me the correct return value:
DECLARE @PeriodStartDate datetime
DECLARE @LastYTD datetime
DECLARE @EndDate datetime
SET @EndDate = '2009-2-15'
select @PeriodStartDate = StartDate from FiscalWeekMap where EndDate = @EndDate
SELECT @LastYTD =...
What am I doing wrong in the below codeto generate the error below. I added the open and close parentheses, but that didn't fix it:
Incorrect syntax near the keyword 'if'
Create PROCEDURE WeekEnding
(
@endDate datetime,
@weekEndingDate datetime OUTPUT,
@WorkWeek int OUTPUT
)
AS
if @endDate...
I am creating a report and need to pull all active employees whose startdate is at least 90 days prior to the first day of each quarter (1/1, 4/1, ect.) and the enddate is null.
Please advise!
Thanks a bunch!!
-T
Is this Case Statement written correctly:
'AvgPayRate' = Case when sum(isnull(o.pay,0)) = 0 then 0
when sum (isnull(o.totalhours,0)) = 0 then 0 else sum(isnull(o.pay,0))/sum (isnull(o.totalhours,0)) end,
'AvgBillRate' = Case when sum(isnull(o.billing,0)) = 0 then 0...
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.