Can someone help me consolidate this procedure into robust way. The procedure is working. I want to rewrite to make it readable for other developers.
Select EmployeeNumber, Hours, PTO, StartDate, EndDate, PreviousHours
INTO #FinalPayPeriodTable
From #TempAggregatedTable
Select EmployeeNumber, ((Hours - (Hours - 80)) - PreviousHours - PTO) AdjHours, Hours as OrgHours, PTO, StartDate, EndDate, PreviousHours
From #FinalPayPeriodTable
Set @hours = (Select ((Hours - (Hours - 80)) - PreviousHours - PTO) AdjHours From #FinalPayPeriodTable)
RETURN @hours
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 8, 2015, 9:06 PM EST
INTO #FinalPayPeriodTable
From #TempAggregatedTable;
Set @hours = (Select AdjHours From #FinalPayPeriodTable);
RETURN @hours;
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 8, 2015, 11:20 PM EST
INTO #FinalPayPeriodTable
From #TempAggregatedTable;
Set @hours = (Select ((Hours - (Hours - 80)) - PreviousHours - PTO)AdjHours From #FinalPayPeriodTable);
RETURN @hours;
David SmithRank #999 · 2K reputationPosted Dec 8, 2015, 9:17 PM EST
David SmithRank #999 · 2K reputationPosted Dec 8, 2015, 9:17 PM EST
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 8, 2015, 9:52 PM EST
David SmithRank #999 · 2K reputationPosted Dec 8, 2015, 10:04 PM EST
David SmithRank #999 · 2K reputationPosted Dec 9, 2015, 5:22 AM EST
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 9, 2015, 11:15 PM EST
David SmithRank #999 · 2K reputationPosted Dec 10, 2015, 12:50 AM EST
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 10, 2015, 1:34 AM EST
David SmithRank #999 · 2K reputationPosted Dec 10, 2015, 1:48 AM EST
Francis SusaimichaelRank #466 · 5.4K reputationPosted Dec 10, 2015, 2:19 AM EST
David SmithRank #999 · 2K reputationPosted Dec 10, 2015, 2:53 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts