I have 2 parameters I am passing in and they are being used as below:
@start = '2010-03-01'
@end = '2010-03-31'.
sum(case when o.startdate between @start and @end then originalopenings else 0 end) as newopenings,
now I need to create another formula but this time I want the ones with start...
I have a formula that I have created:
checkdate between '2010-01-01' and (Select checkdate from prcheckheader where checknumber = @checknumber)
I don't want to have to remember to change ('2010-01-01' )
to always be the first of the year? How can I write the date so it always picks up the...
I have a running total I created based on the following formula:
IF {Command.paycodedesc} in ['Regular Hours', 'Overtime 1', 'Overtime 2', 'Overtime 3']
then {Command.ytdpay}
ELSE 0
Here is the data being pulled:
WeekEnding: 3/27/10
Name Desc Units YTDPay
Company1 OT...
I have 3 fields that I want to print out as (M-3-0)
w.filingstatus+'-'+w.allowances+'-'+ w.exempt
I keep getting error:
Syntax error converting the varchar value 'M-' to a column of data type tinyint.
What am I missing here?
Thanks!!!
I am new to this and have read over some posts prior to asking for help. I have a main repor that has employee data:
Then I have a couple of sub reports that have totals in them as well (these are in the report footer because they wouldn't work in the GF becuase I am grouping on a date range...
I have 2 date fields that I want to concantenate to print as:
1/1/2010 to 2/2/2010. I have this code:
k.startdate+'to'+k.enddate as date
but get this error: Msg 241, Level 16, State 1, Line 6
Syntax error converting datetime from character string.
What am I not doing?
Thanks!
I have a bar graph and the label is by months:
January, February, etc. It prints February, January and I am thinking it is displaying alphabetically.
Is there a way I can get those to print in the correct order?
Thanks for any suggestions!
I have a query that I am doing a left outer join on and it returns rows with all "0" and I don't want those to show; how can I do about doing this? I tried doing something like:
a <>0 or b <> 0 or c <> 0 but that eliminates needed data?
select
clientname, c.clientid...
I am getting this error;
Incorrect syntax near '–'
For this code and cannot figure out what am I doing wrong:
Select clientid, r.orderid, r.totalactive
–
CASE WHEN totalplaced > totalactive then totalactive...
I need to pass in 2 parameters @start and @end.
@start should always be - 1/1/current year
@end should always be - 12/31/current year
How can I achieve that?
Thanks,
Syntax error converting the varchar value 'N/A' to a column of data type int.
Warning: Null value is eliminated by an aggregate or other SET operation.
I am getting the above error when running the below statement:
Case when sum(newpositions) = 0 then 'N/A'
when sum(numerator) = 0 then...
I am stuck on this formula:
Total = columna - columnb (when b is a negative number it adds the 2 and the results come out incorrect)?
How can I get around this?
Thanks!!
I am trying to get a format of mmddyyyy with this formula:
Convert(VarChar(2), month(startdate)) + CONVERT(VarChar(2),Day(startdate)) + Convert(VarChar(4), year(startdate)) as startdate
However it comes out mddyyyy when the month is a single digit, how can I accomplish a 2digit month at all...
I am trying to create a date parameter (@startdate) that includes the minimum of the 2: 1-beginning of the year or 2- @enddate-13?
It needs to be something like:
I have an @enddate paramater being passed in and I need to always go back 13 weeks from that date. If I pass in @enddate =...
I have the below scenario:
RA......
RE......
RW......
All my RW information lists and then my
RS....
This is what I need the file to print out as
RA....
RE....
RW....
RS....
RW....
RS....
I need the RS row to follow after the RW row? How can I acheive this?
Both RS and RW are in 2...
I have the below Case statement that is giving me a "Divide by zero error"
CASE WHEN sum(p2.TempsonStreet) > 0 THEN MIN(ISNULL(p2.AvgBillRate,0) / p2.TempsonStreet) ELSE 0.00 END
However I can correct the error by doing this:
CASE WHEN sum(p2.TempsonStreet) > 0 THEN...
I have a date field that I need to be formatted in 2 ways:
1 - I need the field to come out as YYYYMMDD, but what I have is leaving out the '0' in the month field as:
Convert(VarChar(4), year(getdate()))+''+CONVERT(VarChar(2),Month(getdate()))+''+Convert(VarChar(2), Day(getdate())) as...
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.