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 Mike Lewis 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: *

  1. acesn8s

    Multiple values returned

    Thank you for the help bborissov.
  2. acesn8s

    Multiple values returned

    I am trying to fix an existing query that does not return all the people that it should. I think I have found the problem but by removing the part of the WHERE CLAUSE statement that is keeping the query from returning all the people it causes it to return multiple rows of the same person. I have...
  3. acesn8s

    Summing multiple lines together

    Thank you for your help RiverGuy.
  4. acesn8s

    Summing multiple lines together

    I am trying to take multiple rows of a person and their time worked and turn it into one line with their total time worked for a given date range. At this point I am able to get the different clock in and out times for the day and turn that into HoursWorked for the day but I need to add those...
  5. acesn8s

    Missing Records

    Thanks r937
  6. acesn8s

    Missing Records

    Here is my latest attempt at it but it is still not right. SELECT Records.Employee, Records.HoursWorked, Records.TimeDate FROM (SELECT employee_account_name AS Employee, CONVERT(varchar(10), start_date_time, 101) AS TimeDate, SUM(TimePeriod)...
  7. acesn8s

    Missing Records

    Sorry I wasn't thinking straight. I have dropped the UNION statement since I don't need the TimeExceptions table for this query.
  8. acesn8s

    Missing Records

    Working to modify the query so it will add all the HoursWorked for a person together on one line for a given date range instead of listing each instance of a person and their time for each day on multiple lines so I can select the person to be shown if the total HoursWorked for a week are less...
  9. acesn8s

    Missing Records

    Thank you very much PHV, that solved my problem.
  10. acesn8s

    Missing Records

    Thanks but that didn't change my results. It still does not return a record in the Exc Table if one does not exist in the Records Table.
  11. acesn8s

    Missing Records

    I am trying to modify an existing query to show when a person has 0 hours worked. I need all the records listed in the Exc Table and only the HoursWorked Field from the Records Table when there is a matching record in the Exc Table, if there is not a record that matches the record in the Exc...
  12. acesn8s

    IF statement in where clause

    LOL! Thank you for that correction as well.
  13. acesn8s

    IF statement in where clause

    Thank you very much Golom. I was tring Case statements and that wasn't working out for me and I did not know that I could wright a statement like: AND NOT (TABLE2.CONTACT IS NULL AND TABLE2.TERM_DATE IS NULL)
  14. acesn8s

    IF statement in where clause

    Hi, I am trying to SELECT records from 2 tables. I want to get records WHERE TABLE2_TERM_DATE is NULL unless the TABLE2_CONTACT field is NOT NULL. If the TABLE2_CONTACT is NULL and TABLE2_TERM_DATE is Null then I don't want those records. Below is the code I have so far, any help would be...

Part and Inventory Search

Back
Top