Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How get add shift wise data?

bootstrapJul 4 2014 — edited Jul 4 2014

In operation there are three shift A - 6AM to 2PM , B- 2PM to 10PM and C - 10PM to 6AM.

I have a query that fetches production between certain date. I want to create a procedure that will run at end of each shift and give production output of the last shift only for that day.
Can you please help how to write this query.

My current query is something like this

select sum(mass) from tab1
from tab1
where
time1 between '01-JAN-2013' and '02-JAN-2013'

I need to incorporate this in a stored procedure and schedule this procedure at the end of each shift and this should give output of the last shift only.
Kindly help me in getting the query.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 1 2014
Added on Jul 4 2014
2 comments
541 views