TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Sql Stored Procedure
Dec 9 2015 1:33 AM
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
Reply
Answers (
13
)
Group Summation by Type (PTO & Reg Hours)
Make Stored Procedure Cleaner and Faster