Forum Replies Created

Viewing 15 posts - 1 through 15 (of 33 total)

  • RE: Using Case in a Where Clause.

    Thanks DesNorton, that works great!

    Much appreciated!!

  • RE: using case in where clause

    Well now I just feel stupid. 🙂

    Thanks for the help Matt.

  • RE: Joining the pieces together

    Thanks for the response JonFox.

    What does each row in @EmployeeVacation represent?

    Each row represents the total number of vacation hours an employee is entitled to per year. For example, an...

  • RE: Joining the pieces together

    Actually I was able to get it to work using this.

    But there has got to be a more elegant way...

    ;with Total AS

    (SELECT EV.EmployeeId, EV.TotalVacation FROM @EmployeeVacation EV

    WHERE ev.id in (SELECT...

  • RE: Calculating business days between 2 dates

    Thanks BrainDonor.

    I did search before posting and was able to figure most of the issue out.

    The part I am struggling with is determining how to ignore the year when the...

  • RE: Subquery returned more than 1 value

    Thanks happycat, that worked great!

    This leads me to another question now.

    How can I update in a similar fashion:

    UPDATE @ExampleTable SET

    "SomeValue" = 100 - (SELECT SUM(CASE WHEN ET.SomeValue > 1 THEN...

  • RE: CASE Shortcut

    Thanks Burninator and Chrissy321, that did the trick.

  • RE: SUM from 2 CTE's

    Damnit, I messed another detail up...

    The value in the RemainingVacationDays column was wrong. It should be 82, not 254.

    254 was the RemainingVacationDays value on Jan 1, 2011. This is higher...

  • RE: SUM from 2 CTE's

    Thanks for the help mister.magoo!!

    The query works great for retrieving the remaining vacation to date.

    However, the report allows the user to select a date range to query the remaining vacation.

    For...

  • RE: SUM from 2 CTE's

    Why do you work in hours for absence history and days for vacation?

    The front end allows a user to enter a vacation entry by start/end date and then the length...

  • RE: SUM from 2 CTE's

    Can anyone please help me out?

  • RE: SUM from 2 CTE's

    Thanks for your help Craig.

    Here is the schema/data.

    Yes, I have just hardcoded some values in there for simplicity sake.

    I am only using the last entry in the vacations table becuase...

  • RE: SUM from 2 CTE's

    Thanks for the quick response Craig, it's greatly appreciated.

    Yes you are correct the filtered hours should be 16, not 20 in this example.

    I tried to simplify my post as much...

  • RE: Comparing 2 Tables

    Sorry, I am doing a really poor job of explaining the functionality.

    Let me take another stab at it.

    A Manager creates a performance review for an employee, this is the master...

  • RE: Comparing 2 Tables

    Hi toddasd,

    Thanks for the response.

    -"For the delete, make MasterReviewID on PeerReview reference MasterReview with a cascading delete."

    Can you please provide an example?

    -"But for the insert, I don't quite get it...what...

Viewing 15 posts - 1 through 15 (of 33 total)