Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: luvtitans50
  • Content: Threads
  • Order by date
  1. luvtitans50

    Getting next month's Data based on parameter field

    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...
  2. luvtitans50

    Returning First Day of Current Year

    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...
  3. luvtitans50

    Running Total Issue

    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...
  4. luvtitans50

    Concantenating Fields

    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!!!
  5. luvtitans50

    Sharing Variables From subreport to main report

    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...
  6. luvtitans50

    Concantenating fields

    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!
  7. luvtitans50

    Replacing characters in Fields

    I have a SSN field: 000000000 I want it to print out as : ***-**-0000 How can I accomplish this? Thanks for any suggestions!
  8. luvtitans50

    Order of Graph Labels

    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!
  9. luvtitans50

    Left Outer Join returning unwanted data

    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...
  10. luvtitans50

    Incorrect Syntax

    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...
  11. luvtitans50

    Parameters

    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,
  12. luvtitans50

    Divide by Zero Error

    I cannot figure out the correct syntax to avoid this error: "Divide by Zero Error" Here is the formula: {Command.total}/{Command.returns} Thanks!!
  13. luvtitans50

    Syntax Error Converting VarChar

    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...
  14. luvtitans50

    Formula - Subtracting Negative Numbers

    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!!
  15. luvtitans50

    Removing Decimals and Displaying Whole Numbers

    I have a field "HoursWorked" that displays 164.000 I want it to return 164, how can I accomplish that?
  16. luvtitans50

    Converting Date

    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...
  17. luvtitans50

    Date Range Choosing Minimum Value

    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 =...
  18. luvtitans50

    Merging data from 2 XSLT files

    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...
  19. luvtitans50

    Divide By Zero Error

    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...
  20. luvtitans50

    Formatting Date and Time

    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...

Part and Inventory Search

Back
Top