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 IamaSherpa 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: titans4771
  • Order by date
  1. titans4771

    How to Change a column name in a table

    I have tried to change a column in my table several ways: ALTER TABLE ClientIDtoClientRollup RENAME COLUMN Description to RollupDesccription; ALTER table ClientIDtoClientRollup change Description RollupDesccription varchar(255) They both returns errors: Incorrect syntax near the keyword...
  2. titans4771

    Incorrect Syntax

    Could someone please tell me what I am doing wrong in the statement: SUM(CASE WHEN paycode IN (1,2,3) THEN (d.billunits*d.billrate/(d.payunits*d.payrate)) ELSE 0 END
  3. titans4771

    Update statement error

    I am using 2000? I left out the first part of the query, whcih has my select statement: DECLARE @TimeCardInfo Table (intid int, fieldid int, extid int, timesheetid int, tcid int, firstname varchar(50), lastname varchar(50),TimeSheetPay decimal(19,6), StaffServPay decimal(19,6), CheckPay...
  4. titans4771

    Update statement error

    I am getting the below error: An aggregate may not appear in the set list of an UPDATE statement. When trying to do this: UPDATE t SET [StaffServPay] = SUM(case when d.paycodeid = 1 and computeonunits = 1 then (d.actualunits*d.payrate) when d.paycodeid = 1 then...
  5. titans4771

    Using alias in the where clause

    Select o.orderid, firstname, lastname, 'EMAIL' = isnull(email, email2), 'SUPERVISOR' = MAX(CASE when userdefinedfieldid = 83 and userdefinedanswer = 'Yes' then 'Y' ELSE 'N' END), 'LOCATION LONG TITLE' = Case when oc.workfromhome = 1 then pa.municipality+', '+r.regioncode...
  6. titans4771

    Using alias in the where clause

    I have the below select statement: Select o.orderid, firstname, 'SUPERVISOR' = MAX(CASE when userdefinedfieldid = 83 and userdefinedanswer = 'Yes' then 'Y' ELSE 'N' END), Where SUPERVISOR = 'N' I get the following error: Invalid column name 'SUPERVISOR' even if I enter it like this...
  7. titans4771

    Date Range Filter

    I have a report where I need to calculate units for the year: date between '2009-01-01' and '2009-12-01' How can I write the dates so it automatically pick the current year without having to change it manually? Thanks!!
  8. titans4771

    Suppress on Last Page

    How can I suppress the data from showing on the last page of the report? There is information that I only want to display until I get to the final page, and there I want it supressed so the grand total will only display in the report footer. Thanks!
  9. titans4771

    Getdate Function

    I am currently using getdate() in one of my queries as such: where checkdate = getdate().. problem with this is it prints out the time: 2009-10-23 09:38:48.673 How can I set getdate() to not include the time: 2009-10-23 00:00:00.000 Thanks!!!
  10. titans4771

    Displaying Results in the First Level DrillDown

    I am trying to create a report with drilldown sections and the first sections looks like this: Dept. StatusCnt ------ ----------- A 4 B 15 C...
  11. titans4771

    Printing Total on last page

    Yes there are multiple grouping on invoices based on the store no. associated with the invoice. If I put it in the report footer it will display the overall total after each store grouping which will be misleading.
  12. titans4771

    Printing Total on last page

    It is an invoice that I have created and I only want the total to display in the page footer, not the report footer; is there a way to accomplish this?
  13. titans4771

    Printing Total on last page

    How can I get my total to only print on the last page of the report. I went into Section Expert, Suppress but not sure how to tell it to print on last page. Thanks,
  14. titans4771

    Updating NULL values

    I am trying to update a table I created that have NULL in one of the fields. UPDATE clientidtoclientrollup SET rollupid = clientid WHERE clientid is null Returns: (0 row(s) affected) Thanks for any suggestions...
  15. titans4771

    Date Range for current year to date

    I have created a report and currently entering the date range needed, what I want to do is be able to run this report for the current year as below: checkdate between '2009-01-01' and getdate() How can I have the date range entered without having to enter a date in for the (2009-01-01)? Thanks!

Part and Inventory Search

Back
Top